-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Market Stopped - invalid value encountered #242
Comments
@mesalas this looks like an AMMPS error |
This is from the ammps log. started with the following arguments: RunConfFromFile /usr/simulation/test_conf3838.xlsx /shared/home/ammpssharkfin/output/sparksharkrun13838out --number 3838 --compression true --rabbitMQ-host 20.230.0.191 --rabbitMQ-queue sparksharkrun13838 --prefix lshark Hit market maker price range, shutting market down. ABC MarketMaker Best Ask and Best Bid is outside range 934 , -65 at 2017-01-02 10:37:42.312818 [ammpssharkfin@finsim-scheduler ammps]$ |
Yes its the market Maker stopping because its posting a negative bid. It's also posting a ask at about 900$. So a bid ask spread of 1000$ indicating a very high volatility. Is it a single occurrence or an error happening across the board? @wjt5121 Could you attach the config we are passing to ammps? |
@mesalas Here is the command I passed to the ammps_config_generator but the .xlsx files are no longer on the system.
I'm also attaching the simulation grid with the results. |
Would you be able to send me the ammps logs for run 3838? Im not at my computer right now, so I can't check but if we are changing the growth rate and std we need to pass those parameters to the traders in ammps that use them. |
Here is a breakdown of the success rates base on input parameter. 202800.0 days simulated when dphm is 1000 or 3.26% |
Hmm... that's not good. It's a very low success rate no matter the inputs. I'll see what happens when I run it through the debugger. |
Here is the outputs for run 3838. |
Ok The problem is that the agents that are using lucas asset pricing are not calculating the correct prices. sometime even negative prices. with a dividend of and im getting a price of where price = dividend * PriceToDividendRatio(discountFactor, crra, dividendGrowthRate, dividendStd, daysPerQuarter) and
which should be similar to SHARKFin/sharkfin/utilities.py Line 121 in e7484f7
this means that subjectiveReturn > 1 |
I now understand what's happening. we have changed the defaults of dividendGrowthRate, dividendStd and crra. Setting them to |
I have updated the ammps config generator to use these values. I need to double check and confirm that things are ok but it's late here. ill keep you posted |
Using the latest ammps_config_generator, ammps and sharkfin are happily running together. |
Thank you @mesalas
I think: test on tiny grid, then redo with big grid, is a good plan!
…On Thu, Jun 22, 2023, 5:32 AM Nicholas ***@***.***> wrote:
Using the latest ammps_config_generator, ammps and sharkfin are happily
running together.
@wjt5121 <https://github.com/wjt5121> and @sbenthall
<https://github.com/sbenthall> do we want to rerun the big grid, or just
do a small test to verify and then redo the whole thing?
—
Reply to this email directly, view it on GitHub
<#242 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQZECW2HZESM3EC74XWG3XMQGJNANCNFSM6AAAAAAZNUWOVU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok great! I'm spinning up the cluster now and I will run a single seed on the grid. |
Similar results. Only about 3% of the days simulated. I'm attaching the results csv and the logs for simid 383. 2:06:40 PM 0 got data: {"bl": 0, "sl": 0, "dividend": 0.008754777224170868, "end_simulation": false, "market_broker_arg": "0"} Hit market maker price range, shutting market down. ABC MarketMaker Best Ask and Best Bid is outside range 2099 , -184 at 2017-01-02 09:55:58.522598 19184 days simulated when dphm is 1000 or 6.17% |
@wjt5121 383 is running fine on my end. We need to double check that you are pulling the latest version of ammps_config_generator (https://github.com/mesalas/ammps_config_generator) If you have any way of saving the ammps config (the excel file generated by ammps_config_generator that we parse) this would help me to figure out what's going on. |
@mesalas I ssh'ed into a host while it was running a simulation and was able to capture the xlsx config file which is attached. I also check the version of the config_gen repo and I think it's correct.
|
Thanks for the config file. From the git output the version of config repo seems correct though. It may make sense to try and ssh into the host and see what's in |
Uninstalling the acg package resolved the issue. |
20.230.0.191 sparksharkrun13838 7432 25 4 60 ClientRPCMarket InferentialExpectations LUCAS0 3.0 0.99 1.000203 0.011983 0.005 5000 0.1 0.1 60.0 60.0 0.3 0 0 0 None ClosingPrice
subjective_return: 0.9999130331113283
Q-0
waiting for response...
response received:{'BuyTarget': 1, 'SellTarget': 1, 'ClosingPrice': 1, 'MarketState': 'Stopped: Hit market maker price range, shutting market down. ABC MarketMaker Best Ask and Best Bid is outside range 934 , -65 at 2017-01-02 10:37:42.312818\n', 'NextDividend': 1}
The market stopped! Do something!
Ending simulation
Market stopped
Ran for 1 days
Ran for 1 days
Ran for 1 days
Problem computing stylized facts
Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required by LinearRegression.
Ending the run_any_simulation.py script
basic_cancel - consumer not found: ctag1.bfd4b92c656d40cb9ed0fb7c97ad7fe0
/shared/home/ammpssharkfin/.local/lib/python3.9/site-packages/scipy/stats/_stats_mstats_common.py:196: RuntimeWarning: invalid value encountered in sqrt
t = r * np.sqrt(df / ((1.0 - r + TINY)*(1.0 + r + TINY)))
/usr/local/lib64/python3.9/site-packages/pandas/core/internals/blocks.py:2538: RuntimeWarning: invalid value encountered in cast
values = values.astype(str)
The text was updated successfully, but these errors were encountered: