-
I'm probably not understanding where the strategy name needs to be. Must it be its own folder with the yaml files inside of it? |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 7 replies
-
A few things here:
|
Beta Was this translation helpful? Give feedback.
-
I just noticed you are trying to do an interactive backtest. That changes a few things... First, you need to have a saved result (.pck file). I don't see one of those anywhere. That file is generated when you run a successful production backtest. So you need to do that first, if you haven't. The .pck file will be stored in the |
Beta Was this translation helpful? Give feedback.
-
I feel like I've thrown a lot of things at you there. To summarize:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, again, Todd. |
Beta Was this translation helpful? Give feedback.
-
Making progress, but now it says unable to get capital data. Thanks, again. |
Beta Was this translation helpful? Give feedback.
-
Capital update apparently failed previously. You need to mark it as finished before running again.
Option 4, then option 43. HOWEVER...run_capital_update attempts to get the current capital from an IB account. Are you in a position to do that? I think maybe what you really want here is to run a backtest as a simulation, not a production backtest. If that is the case, see https://github.com/robcarver17/pysystemtrade/blob/master/docs/backtesting.md#how-do-icreate-a-standard-futures-backtest That doesn't generate something that can be used with interactive_diagnostics...(you could, but you'll have to write some code and figure that out.) |
Beta Was this translation helpful? Give feedback.
-
Thanks, Todd. That trick to closed the process worked, but I am still getting the same error. For more context: I have a backtest that I'm happy with pickled into a .pck file, if that helps. I have set up all the preliminaries to start running the system on a paper account at IB (with 250K of paper money). I have a baseline of prices in mongo/arctic, and have created roll calendars and multiple/adjusted price series in mongo/arctic. So, now I'd just like to get the system running live. Or, at the very least, I'd like it to tell me what positions I should take on, so I could manually trade them. I have basically followed all of the steps here (https://github.com/robcarver17/pysystemtrade/blob/master/docs/production.md#quick-start-guide) and am now stuck on the interactive diagnostics step. Thanks, again for any help! |
Beta Was this translation helpful? Give feedback.
-
Ok, that helps a lot. I was starting to wonder what exactly you were trying to accomplish. So in that case, I think the next step would indeed be to run the capital update process.
I don't quite understand this, though. If you're still getting the same error, then it didn't work...which error are you referring to? |
Beta Was this translation helpful? Give feedback.
-
If you're referring to the error when doing run_systems, you probably have some missing or incorrect config. In private_config, you should have something like this.
Your values will obviously be different, but you need to add these sections and/or correct the values. Note especially the names of the systems here...it seems like you've changed things from when this discussion first started: peter_system has become peter_system_folder??? The "Allocate capital to strategies" part tells the capital update process what to do. So when you think you have the config correct, you'll need to run_capital_update again. Then try run_systems and see what happens. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Here's my private config yaml, if it helps: broker_account: DU6891304 #papertrade email_address: 'email@gmail.com' # add your address here ib_ipaddress: 127.0.0.1 # this changes if you set up elsewhere mongo_host: 127.0.0.1 # can be elsewhere backtest_store_directory: '/private/backtests' strategy_list: strategy_capital_allocation: |
Beta Was this translation helpful? Give feedback.
-
And, here is private control config: process_configuration_start_time: process_configuration_methods: run_systems: |
Beta Was this translation helpful? Give feedback.
-
2a) update_total_capital should be able to initialize the capital, but it looks like it can't. This might be a bug. You can try interactive_update_capital_manual, but it looks like that might have the same problem. 2b) Looks like there might also might be a config issue allocating strategy capital, but lets get total capital working before worrying about that. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It's showing not yet time to run. I guess that is a config somewhere? |
Beta Was this translation helpful? Give feedback.
-
Scrolling up to your private_control_config, I see you have the run_systems start_time set for 17:15 |
Beta Was this translation helpful? Give feedback.
-
Got it, thanks. Now it can't find peter_system.yaml, although it is right there (both in virtual and normal environments). |
Beta Was this translation helpful? Give feedback.
-
In private_control_config, you have
You have 3 options:
I prefer 1, but for consistency, maybe you should do 2, since other config files are being referenced from the venv. |
Beta Was this translation helpful? Give feedback.
-
Excellent, it worked! I will plan on running this live (on my paper account) on Monday. Thanks for all your generous help, Todd. |
Beta Was this translation helpful? Give feedback.
-
Closing as resolved. |
Beta Was this translation helpful? Give feedback.
In private_control_config, you have
You have 3 options:
I prefer 1, but for consistency, maybe you should do 2, since other config files are being referenced from the venv.