SmartQuant Discussion
http://www.smartquant.com/forums/

Run PythonNet strategy with other ide
http://www.smartquant.com/forums/viewtopic.php?f=86&t=14824
Page 1 of 1

Author:  sharpwood [ Wed May 09, 2018 11:46 am ]
Post subject:  Run PythonNet strategy with other ide

Openquant 2014 added PythonNet support in version 1.0.6692.
In can run BollingerBands_PYthonNet Demo normally in OpenQuant  ide, but if you run it with other IDE such as visual studio or vs code, it will report:

PyScenario.py", line 31, in __init__
     Self.framework = SmartQuant.Framework.Current
TypeError

Author:  skuvv [ Tue May 15, 2018 9:42 am ]
Post subject:  Re: Run PythonNet strategy with other ide

Hello sharpwood,
pythonnet demo solution was updated in new release(1.0.6708 from 14 may).
Try it again after update, it should works everywhere.

Author:  sharpwood [ Tue May 15, 2018 1:23 pm ]
Post subject:  Re: Run PythonNet strategy with other ide

skuvv wrote:
Hello sharpwood,
pythonnet demo solution was updated in new release(1.0.6708 from 14 may).
Try it again after update, it should works everywhere.


Great,It wroks.
But it is very slow when I run a strategy on 1 minute bar

Author:  skuvv [ Tue May 15, 2018 2:52 pm ]
Post subject:  Re: Run PythonNet strategy with other ide

sharpwood wrote:
skuvv wrote:
Hello sharpwood,
pythonnet demo solution was updated in new release(1.0.6708 from 14 may).
Try it again after update, it should works everywhere.


Great,It wroks.
But it is very slow when I run a strategy on 1 minute bar

My results right out of the box:
Code:
05/15/2018 14:46:21.583 Data simulator thread stopped
05/15/2018 14:46:21.585 Data run done, count = 4694750 ms = 2329 event/sec = 2015000
05/15/2018 14:46:22.247 PythonEngine::Finished


With enabled events for Bid/Ask/Trade:
Code:
05/15/2018 14:49:05.302 Data simulator thread stopped
05/15/2018 14:49:05.305 Data run done, count = 4694750 ms = 27262 event/sec = 172000
05/15/2018 14:49:06.033 PythonEngine::Finished


Thus, you can see that more events from C # to python mean a decrease in performance...
Personally I think that python.net should be used for things which cannot be realized in C# and not for replacing whole C#.

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/