diff --git a/sharkfin/markets/ammps.py b/sharkfin/markets/ammps.py index bd49aae..5bc4bd4 100644 --- a/sharkfin/markets/ammps.py +++ b/sharkfin/markets/ammps.py @@ -31,8 +31,8 @@ def __init__(self, seed=None, queue_name='', host='localhost', - dividend_growth_rate = 1.000628, - dividend_std = 0.011988, + dividend_growth_rate = 1.000203, + dividend_std = 0.011983, price_to_dividend_ratio = 60 / 0.05, rng = None, macro_price_field = None, diff --git a/sharkfin/tests/test_markets.py b/sharkfin/tests/test_markets.py index 6be3f92..c177135 100644 --- a/sharkfin/tests/test_markets.py +++ b/sharkfin/tests/test_markets.py @@ -49,7 +49,7 @@ def test_stopped_market(self): dividend_growth_rate = 1.000628 dividend_std = 0.011988 - pdr = price_dividend_ratio_random_walk(0.95, 5, dividend_growth_rate, dividend_std) + pdr = price_dividend_ratio_random_walk(0.95, 5, dividend_growth_rate, dividend_std, 90) market = MockMarket( dividend_growth_rate = 1.000628, diff --git a/sharkfin/utilities.py b/sharkfin/utilities.py index d711eed..ac1d1e8 100644 --- a/sharkfin/utilities.py +++ b/sharkfin/utilities.py @@ -125,7 +125,7 @@ def combine_lognormal_rates(ror1, std1, ror2, std2): def price_dividend_ratio_random_walk( - DiscFac, CRRA, dividend_growth_rate, dividend_std, days_per_quarter=90 + DiscFac, CRRA, dividend_growth_rate, dividend_std, days_per_quarter ): ## From Equation 30 from the C. Carroll Lucas asset pricing notes: ## http://www.econ2.jhu.edu/people/ccarroll/public/lecturenotes/AssetPricing/LucasAssetPrice.pdf diff --git a/simulate/run_any_simulation.py b/simulate/run_any_simulation.py index 6f49854..8bdbf2a 100644 --- a/simulate/run_any_simulation.py +++ b/simulate/run_any_simulation.py @@ -54,7 +54,7 @@ def default(self, obj): # General simulation arguments parser.add_argument("-d", "--seed", help="random seed", default=0) parser.add_argument("--quarters", help="number of quarters", default=2) -parser.add_argument("--runs", help="runs per simulation", default=60) +parser.add_argument("--days", help="days per quarter", default=60) # Population parameters parser.add_argument( @@ -93,17 +93,17 @@ def default(self, obj): parser.add_argument( "--pop_CRRA", help="Mean population CRRA. Used for MockMarket and LUCAS0 population.", - default="3", + default="5", ) parser.add_argument( "--pop_DiscFac", help="Mean population CRRA. Used for MockMarket and LUCAS0 population.", - default="0.99", + default="0.90", ) parser.add_argument( "--pop_aNrmInitMean", help="Log of initial mean asset levels for LUCAS0 population.", - default="6", + default="0.5", ) parser.add_argument( @@ -169,7 +169,7 @@ def run_attention_simulation( agent_parameters, a=None, q=None, - r=1, + r=1, ############ALERT########################## market=None, fm=None, dphm=1500, @@ -193,7 +193,7 @@ def run_attention_simulation( fm, a=a, q=q, - r=r, + r=r, ############ALERT########################## market=market, rng=rng, seed=seed, @@ -210,7 +210,7 @@ def run_chum_simulation( agent_parameters, a=None, q=None, - r=1, + r=1, ############ALERT########################## fm=None, market=None, dphm=1500, @@ -224,7 +224,7 @@ def run_chum_simulation( SequentialPortfolioConsumerType, agent_parameters, dphm=dphm, rng=rng ) - sim = CalibrationSimulation(a=a, q=q, r=r, market=market) + sim = CalibrationSimulation(a=a, q=q, r=r, market=market) ############ALERT########################## sim.simulate(burn_in=pad, buy_sell_shock=(buy, sell)) @@ -250,11 +250,12 @@ def env_param(name, default): seed = int(args.seed) popn = int(args.popn) quarters = int(args.quarters) - runs = int(args.runs) + days_per_quarter = int(args.days) + runs = days_per_quarter # variable runs per quarter is an artifact of an earlier version + # and should be deprecated # General market arguments market_class_name = str(args.market) - population_name = str(args.population) pop_CRRA = float(args.pop_CRRA) pop_DiscFac = float(args.pop_DiscFac) @@ -301,7 +302,7 @@ def env_param(name, default): seed, popn, quarters, - runs, + days_per_quarter, market_class_name, expectations_class_name, population_name, @@ -334,7 +335,7 @@ def env_param(name, default): "dividend_std": dividend_std, "rng": rng, "price_to_dividend_ratio": price_dividend_ratio_random_walk( - pop_DiscFac, pop_CRRA, dividend_growth_rate, dividend_std + pop_DiscFac, pop_CRRA, dividend_growth_rate, dividend_std, days_per_quarter ), } @@ -384,7 +385,8 @@ def env_param(name, default): parameter_dict, a=attention, q=quarters, - r=runs, + # days_per_quarter is current hard-coded at 60. + r=runs, #############ALERT########################### market=market, fm=expectations_class, dphm=dphm, @@ -403,7 +405,8 @@ def env_param(name, default): parameter_dict, a=attention, q=quarters, - r=runs, + # days_per_quarter is current hard-coded at 60. + r=runs, #############ALERT########################### market=market, dphm=dphm, buy=buysize,