π¦ Applicationsο
Collection of pre-trained models
FairMarketcapYahooο
- ml_investment.applications.fair_marketcap_yahoo.FairMarketcapYahoo(pretrained=True) ml_investment.pipelines.Pipeline[source]ο
Model is used to estimate fair company marketcap for last quarter. Pipeline uses features from
BaseCompanyFeatures,QuarterlyFeaturesand trained to predict real market capitalizations ( usingQuarterlyTarget). Since some companies are overvalued and some are undervalued, the model makes an average βfairβ prediction.yahoois used for loading data.- Parameters
pretrained β use pretreined weights or not. If so, fair_marketcap_yahoo.pickle will be downloaded. Downloading directory path can be changed in ~/.ml_investment/config.json
models_path
FairMarketcapSF1ο
- ml_investment.applications.fair_marketcap_sf1.FairMarketcapSF1(max_back_quarter: Optional[int] = None, min_back_quarter: Optional[int] = None, data_source: Optional[str] = None, pretrained: bool = True, verbose: Optional[bool] = None) ml_investment.pipelines.Pipeline[source]ο
Model is used to estimate fair company marketcap for several last quarters. Pipeline uses features from
BaseCompanyFeatures,QuarterlyFeatures,DailyAggQuarterFeatures,CommoditiesAggQuarterFeaturesand trained to predict real market capitalizations ( usingQuarterlyTarget). Since some companies are overvalued and some are undervalued, the model makes an average βfairβ prediction.sf1andquandl_commoditiesis used for loading data.Note
SF1 dataset is paid, so for using this model you need to subscribe and paste quandl token to ~/.ml_investment/secrets.json
quandl_api_key- Parameters
max_back_quarter β max quarter number which will be used in model
min_back_quarter β min quarter number which will be used in model
data_source β which data use for model. One of [βsf1β, βmongoβ]. If βmongoβ, than data will be loaded from db, credentials specified at ~/.ml_investment/config.json. If βsf1β - from folder specified at
sf1_data_pathin ~/.ml_investment/secrets.json.pretrained β use pretreined weights or not. Downloading directory path can be changed in ~/.ml_investment/config.json
models_pathverbose β show progress or not
FairMarketcapDiffYahooο
- ml_investment.applications.fair_marketcap_diff_yahoo.FairMarketcapDiffYahoo(pretrained=True) ml_investment.pipelines.Pipeline[source]ο
Model is used to evaluate quarter-to-quarter(q2q) company fundamental progress. Model uses
QuarterlyDiffFeatures(q2q results progress, e.g. 30% revenue increase, decrease in debt by 15% etc),BaseCompanyFeatures,QuarterlyFeaturesand trying to predict smoothed real q2q marketcap difference(DailySmoothedQuarterlyDiffTarget). So model prediction may be interpreted as βfairβ marketcap change according this q2q fundamental change.yahooanddaily_barsare used for loading data.- Parameters
pretrained β use pretreined weights or not. If so, fair_marketcap_diff_yahoo.pickle will be downloaded. Downloading directory path can be changed in ~/.ml_investment/config.json
models_path
FairMarketcapDiffSF1ο
- ml_investment.applications.fair_marketcap_diff_sf1.FairMarketcapDiffSF1(max_back_quarter: Optional[int] = None, min_back_quarter: Optional[int] = None, data_source: Optional[str] = None, pretrained: bool = True, verbose: Optional[bool] = None) ml_investment.pipelines.Pipeline[source]ο
Model is used to evaluate quarter-to-quarter(q2q) company fundamental progress. Model uses
QuarterlyDiffFeatures(q2q results progress, e.g. 30% revenue increase, decrease in debt by 15% etc),BaseCompanyFeatures,QuarterlyFeaturesCommoditiesAggQuarterFeaturesand trying to predict real q2q marketcap difference(QuarterlyDiffTarget). So model prediction may be interpreted as βfairβ marketcap change according this q2q fundamental change.sf1is used for loading data.Note
SF1 dataset is paid, so for using this model you need to subscribe and paste quandl token to ~/.ml_investment/secrets.json
quandl_api_key- Parameters
max_back_quarter β max quarter number which will be used in model
min_back_quarter β min quarter number which will be used in model
data_source β which data use for model. One of [βsf1β, βmongoβ]. If βmongoβ, than data will be loaded from db, credentials specified at ~/.ml_investment/config.json. If βsf1β - from folder specified at
sf1_data_pathin ~/.ml_investment/secrets.json.pretrained β use pretreined weights or not. Downloading directory path can be changed in ~/.ml_investment/config.json
models_pathverbose β show progress or not
MarketcapDownStdYahooο
- ml_investment.applications.marketcap_down_std_yahoo.MarketcapDownStdYahoo(pretrained=True) ml_investment.pipelines.Pipeline[source]ο
Model is used to predict future down-std value. Pipeline consist of time-series model training(
TimeSeriesOOFModel) and validation on real marketcap down-std values(DailyAggTarget). Model prediction may be interpreted as βriskβ for the next quarter.yahoois used for loading data.- Parameters
pretrained β use pretreined weights or not. If so, marketcap_down_std_yahoo.pickle will be downloaded. Downloading directory path can be changed in ~/.ml_investment/config.json
models_path
MarketcapDownStdSF1ο
- ml_investment.applications.marketcap_down_std_sf1.MarketcapDownStdSF1(max_back_quarter: Optional[int] = None, min_back_quarter: Optional[int] = None, data_source: Optional[str] = None, pretrained: bool = True, verbose: Optional[bool] = None) ml_investment.pipelines.Pipeline[source]ο
Model is used to predict future down-std value. Pipeline consist of time-series model training(
TimeSeriesOOFModel) and validation on real marketcap down-std values(DailyAggTarget). Model prediction may be interpreted as βriskβ for the next quarter.sf1is used for loading data.Note
SF1 dataset is paid, so for using this model you need to subscribe and paste quandl token to ~/.ml_investment/secrets.json
quandl_api_key- Parameters
max_back_quarter β max quarter number which will be used in model
min_back_quarter β min quarter number which will be used in model
data_source β which data use for model. One of [βsf1β, βmongoβ]. If βmongoβ, than data will be loaded from db, credentials specified at ~/.ml_investment/config.json. If βsf1β - from folder specified at
sf1_data_pathin ~/.ml_investment/secrets.json.pretrained β use pretreined weights or not. Downloading directory path can be changed in ~/.ml_investment/config.json
models_pathverbose β show progress or not