Multi Example
-
Hi
Can I ask someone to explain following script code snippet:class St(bt.Strategy):
params = dict(
enter=[1, 3, 4], # data ids are 1 based
hold=[7, 10, 15], # data ids are 1 based
it is cut from :
backtrader.com/blog/posts/2017-04-09-multi-example/multi-example.htmlwhy such default values and not others?
Thank You in advance for some comments especially from administrators.
-
@augustus said in Multi Example:
why such default values and not others?
Why not? It is just an example.
Can I ask why ...
For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
-
I thought that the values obtained from the some simulations were behind these values.
-
It's just an example. It's not some secret sauce.
-
I apologize if what I am going to ask now seems plain but I am trying to familiarize myself with the sketch of creation of the backtest strategy, but this line of code is not obvious to me and I would like someone to clarify it for me :
**eval('dict(' + args.strat + ')'))
from what I know, this is a function eval () whose parameter is the sequence runs python code
but this record absolutely puzzled me because it seems to me that it is from packing of
a dictionary items .- **