Had a few questions/issues after working through interactive development tutorials:
-
When specifying
DB_TIMES
, it appears we have to specify every individual moment in time (as opposed to a window). But if your database has 1 minute candles, you may want 1 minute resolution but only within say a 4 hour window in the day (or only for which data is valid/exists). Is there a way to achieve that? I tried using theCALENDAR
feature for this, but still got after market data. I'd like to just get 1 minute data between 10am - 2pm for example. My issue is that I'm getting a bunch ofNan
data during the off-market times, which makes my signal generation more complicated and prone to errors. -
When developing interactively, I specify a
start_date
forget_historical_prices()
, but it seems it is ignored. I still get data as far back as the database has data. I used this:
prices = self.get_historical_prices(start_date='2019-05-25', end_date='2019-06-03')
print(prices)
This resulted in printing out prices as far back as 2018-04-01. -
To optimize data retrieving for intraday trading, is there a way to have only a certain amount of data passed to
prices_to_signals
(for example, only the most recent 10 days?), or is that managed by just limiting data in the database itself specified byDB
? My idea is to keep the data passed toprices_to_signals
larger for backtesting, but make it as small as feasible for live trading.
Thanks.