my_system.rules.get_raw_forecast("EDOLLAR", "ewmac32").tail(5) from systems.forecast_scale_cap import ForecastScaleCap # we can estimate these ourselves my_config.instruments = ["US10", "EDOLLAR", "CORN", "SP500"] my_config.use_forecast_scale_estimates = True fcs = ForecastScaleCap() my_system = System([fcs, my_rules], data, my_config) print( my_system.forecastScaleCap.get_forecast_scalar("EDOLLAR", "ewmac32").tail(5)) # or we can use the values from the book my_config.forecast_scalars = dict(ewmac8=5.3, ewmac32=2.65) my_config.use_forecast_scale_estimates = False fcs = ForecastScaleCap() my_system = System([fcs, my_rules], data, my_config) print( my_system.forecastScaleCap.get_capped_forecast("EDOLLAR", "ewmac32").tail(5)) """ combine some rules """ from systems.forecast_combine import ForecastCombine # defaults combiner = ForecastCombine() my_system = System([fcs, my_rules, combiner], data, my_config)
my_system = System([empty_rules], data, my_config) my_system.rules.get_raw_forecast("EDOLLAR", "ewmac32").tail(5) from systems.forecast_scale_cap import ForecastScaleCap ## we can estimate these ourselves my_config.instruments=[ "US10", "EDOLLAR", "CORN", "SP500"] my_config.use_forecast_scale_estimates=True fcs=ForecastScaleCap() my_system = System([fcs, my_rules], data, my_config) print(my_system.forecastScaleCap.get_forecast_scalar("EDOLLAR", "ewmac32").tail(5)) ## or we can use the values from the book my_config.forecast_scalars = dict(ewmac8=5.3, ewmac32=2.65) my_config.use_forecast_scale_estimates=False fcs=ForecastScaleCap() my_system = System([fcs, my_rules], data, my_config) print(my_system.forecastScaleCap.get_capped_forecast( "EDOLLAR", "ewmac32").tail(5)) """ combine some rules """ from systems.forecast_combine import ForecastCombine ## defaults combiner = ForecastCombine() my_system = System([fcs, my_rules, combiner], data, my_config)