Greetings,

I'm trying to import VFINX  data which has historical data back to 1986. I'm using the format described in this question ["need help importing custom data"].  However when I run my algorithm it simply outputs the following message:

```                          
Launching analysis for d6b5c8bc457293d7d0b4d154404e9828 with LEAN Engine v2.4.0.0.7199
Data for symbol SPY has been limited due to numerical precision issues in the factor file. The starting date has been set to 1/1/1998.
Algorithm (d6b5c8bc457293d7d0b4d154404e9828) Completed.                           
The starting date for symbol SPY, 1998-01-01, has been adjusted to match map file first date 1998-01-02.

```

My Data class and import code are below, but one thing I should mention is I am using schedule functions in my algorithm. Does custom data work with scheduled functions?:

###
class spy3x(PythonData):
'''EURUSD Custom Data Class'''
def GetSource(self, config, date, isLiveMode):
return SubscriptionDataSource("https://www.dropbox.com/s/1et85hf5s31jate/3x-vfinx-sp500-history.csv?dl=1", SubscriptionTransportMedium.RemoteFile)


def Reader(self, config, line, date, isLiveMode):
if not (line.strip() and line[0].isdigit()): return None

# New Nifty object
currency = spy3x()
currency.Symbol = config.Symbol

try:
# Example File Format:
# Date, Close
# 2011-09-13 7792.9
data = line.split(',')
currency.Time = datetime.strptime(data[0], "%Y.%m.%d")
currency.Value = data[1]
#currency["Open"] = float(data[2])
#currency["High"] = float(data[3])
#currency["Low"] = float(data[4])
currency["Close"] = float(data[1])


except ValueError:
# Do nothing
return None

return currency

###
# AddData call and history call below
###
self.spy3x = self.AddData(spy3x, "D_UPRO", Resolution.Daily).Symbol
self.tlt3x = self.AddData(tlt3x, "D_TMF", Resolution.Daily).Symbol

self.BASE_SYMBOL = self.spy3x
self.symbols = [self.spy3x, self.tlt3x]


# example history call to get prices
self.prices = (
self.History(self.symbols, self.LOOKBACK, self.HISTORY_RESOLUTION)["close"]
.unstack(level=0)
.astype(np.float32)
)

###
# Schedule Function example below
###

self.Schedule.On(
self.DateRules.WeekStart(self.BASE_SYMBOL),
self.TimeRules.AfterMarketOpen(self.BASE_SYMBOL, 10), # could this be an issue??
Action(self.rebalance))

 

Author