Skip to content
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

Running a strategy from a Jupyter Notebook #70

Open
asmodehn opened this issue Jul 28, 2019 · 1 comment
Open

Running a strategy from a Jupyter Notebook #70

asmodehn opened this issue Jul 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@asmodehn
Copy link
Contributor

I would like to run a strategy from a notebook (to be able to draw diagrams and study a strategy with a more interactive and graphical interface).

How would I go about doing this ? I probably need to run the harness, from python and not from shell so that I can pass the strategy class from the notebook cell, redirect the log output somewhere else... and probably stop at some time in the future(not going for ever)...

Has anyone already done that before ?
Maybe something to add to the docs...

@garethdmm
Copy link
Owner

I don't think you could do this today, but it's something that a moderate-scale refactor could probably achieve.

The logic for booting the strategy engine and running a strategy is split between 3-4 modules right now in gryphon.execution

  • app ~ parses command line arguments, dispatches to live_runner
  • live_runner ~ does a lot of clerical work to set up the harness and the tick loop
  • harness/harness ~ main overseer of the strategy

The main effort for such a refactor would be in live_runner, which is quite complex right now. There really are a lot of things that need to be set up in the runtime environment in order to run a strategy.

There may be difficult product questions that come up in such an effort too. Like, does sending SIGINT signal to a strategy still work in jupyter? If not how are we going to control it once it's in operation?

@garethdmm garethdmm added the enhancement New feature or request label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants