You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the get_historical_prices() function with Alpaca does not return length number of time-steps. This is inconsistent with other data-sources such as Yahoo Finance which would return length number of time-steps. This causes there to be a discrepancy between back-testing and live trading. This could also be why issue #258 is caused.
The part of the repository that seems to cause this issue is because of:
This is in contrast to what Yahoo Finance does which is getting all the data and then getting the number of rows required, so the data-frame always has length number of rows:
Dates are slightly different but the point is the same as the length is vastly different between them both. This could cause major issues between back-testing and live trading.
Expected Behavior
Back-testing and live trading data should be similar, whether it is based on getting 200 time-steps of data (not necessarily 200 bars) or 200 time rows of data (may be more than 200).
The documentation is also very ambiguous rather this issue where it states here that bars may not be equal to the length but that is opposed by what is stated here.
The text was updated successfully, but these errors were encountered:
Description
Using the
get_historical_prices()
function with Alpaca does not returnlength
number of time-steps. This is inconsistent with other data-sources such as Yahoo Finance which would returnlength
number of time-steps. This causes there to be a discrepancy between back-testing and live trading. This could also be why issue #258 is caused.The part of the repository that seems to cause this issue is because of:
lumibot/lumibot/data_sources/alpaca_data.py
Lines 163 to 166 in 507c06b
This does not update the
curr_start
.This is in contrast to what Yahoo Finance does which is getting all the data and then getting the number of rows required, so the data-frame always has length number of rows:
lumibot/lumibot/tools/yahoo_helper.py
Lines 174 to 176 in 507c06b
lumibot/lumibot/data_sources/yahoo_data.py
Lines 92 to 95 in 507c06b
Outputs
Alpaca
Yahoo Finance
Dates are slightly different but the point is the same as the length is vastly different between them both. This could cause major issues between back-testing and live trading.
Expected Behavior
Back-testing and live trading data should be similar, whether it is based on getting 200 time-steps of data (not necessarily 200 bars) or 200 time rows of data (may be more than 200).
The documentation is also very ambiguous rather this issue where it states here that bars may not be equal to the length but that is opposed by what is stated here.
The text was updated successfully, but these errors were encountered: