Closed pat42w closed 3 years ago
Do we need to pull extra resources on to this? ;)
Isolated the issue to this GEG stock, but it seems to be an issue from when the data was pulled as a repull through yfinance fixes it.
i will add in watching for these "mid nans" into the priceDB_validation() function.
Fix applied using df.fillna(method='bfill')
this uses the next valid days price to fill the preceeing days ensuring day 1 of the actual period does not have an nan.
I have checked a handful of different cases in the EF_analysis notebook& it has fixed these, So I'm happy to close this issue, i will regenerate the portfolios overnight to ensure it fixed all the infs it overnight
database=df_Nasdaq startdate=pd.to_datetime("2015-08-01") enddate=pd.to_datetime("2016-12-01") dmf.portfolio_generate_test(database,startdate,enddate,p_max=250, min_returns=0.01, s_asset=0, asset_len=50, silent=False, obj_method="SHARPE")
Results in inf