Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

⚡️ Switched VWAP to Rolling VWAP #196

Merged
merged 4 commits into from
Nov 27, 2021

Conversation

3ylo
Copy link
Contributor

@3ylo 3ylo commented Nov 20, 2021

Switched to rolling_vwap to fix lookahead bias on vwap.

@Rikj000 Rikj000 changed the title Feature/rolling vwap ⚡️ Switched VWAP to Rolling VWAP Nov 21, 2021
@Rikj000 Rikj000 self-requested a review November 21, 2021 04:10
@Rikj000 Rikj000 added the Feature - Enhancement Update or improvement to existing feature label Nov 21, 2021
@Rikj000 Rikj000 added this to the v0.13.0 milestone Nov 21, 2021
@Rikj000 Rikj000 linked an issue Nov 21, 2021 that may be closed by this pull request
@Rikj000
Copy link
Owner

Rikj000 commented Nov 21, 2021

Thank you @3ylo for this PR! 😊
I already changed some more occurrences from VWAP ➡️ Rolling VWAP.

Only thing left to do now to make this PR complete is change the 3 vwap_cross occurrences in the TotalOverallSignalImportanceCalculator to rolling_vwap_cross:

Copy link
Owner

@Rikj000 Rikj000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🎉
However I haven't tested my own commits on this PR yet,
so we'll need to do at least one test to make sure i didn't accidentally put in a mistake 🙂

@Rikj000 Rikj000 added Needs Testing This feature, improvement or bugfix still is in need of testing In Progress This is being worked on labels Nov 21, 2021
@Rikj000
Copy link
Owner

Rikj000 commented Nov 27, 2021

I've been testing this PR over & over on the latest development the past few days.
In general HO1s yield better results with it, but the results HO2s give are sadly a bit less profitable in general.

ho_results_vwap_and_rolling_vwap

However I've still decided to merge in this PR because:

  • VWAP itself has a look-ahead bias, which is not ideal for HyperOpting as it will over-fit easier on this indicator due to that.
  • Rolling VWAP solves the problem of VWAP with fixed time periodicity as it continuously rolls based on a fixed time period.
  • Rolling VWAP is especially useful for Crypto currencies, since their markets don't close over the weekend.

Further if you compare the VWAP - SMA Crosses & Rolling VWAP - SMA Crosses in this chart,
then I think it's clear that the crosses of the rolling version give off better signals at more critical moments:
vwap_rolling_vs_vwap

@Rikj000 Rikj000 removed In Progress This is being worked on Needs Testing This feature, improvement or bugfix still is in need of testing labels Nov 27, 2021
@Rikj000 Rikj000 merged commit 0720f43 into Rikj000:development Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature - Enhancement Update or improvement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚡️ Switch from VWAP to Rolling VWAP
2 participants