Closed fightthepower closed 4 years ago
This is because you are asking for the current close price at the market open. It would be easy to have a time leak by accident if close prices were available at the open. If you want to use future data in your backtests (which I recommend against, unless it is for evaluating your predictions) you can instantiate a new instance of YahooFinanceProvider
.
Edit: Because you are only logging at market open, what you call "Current Close" should actually be "Current Open".
Edit2: Actually "Current Close" confused me as well and now I see what the actual issue is ^^ I will add a dropna
at the relevant place which will fix this. Will be included in 0.6.1
This example has taken from the quickstart tutorial
Code
Close prices
Expected
What I am getting
Is this supposed to do this way?