Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

#938, Fixing Error: invalid bucket size spec: undefined #940

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

haxwell
Copy link
Contributor

@haxwell haxwell commented Dec 20, 2017

In addition to the options on a command, there are options on
strategies. There is a callback function in engine.js which sets the
options as defined in a strategy. The strategy objects were not
updated to have a periodSize option, only a period option. So,
the periodSize attribute was not being set. This caused the
execption in this bug.

This commit adds a second option, named 'periodLength'. The name
'periodLength' was chosen, rather than the previous 'periodSize' for
consistency; the description for the --period option already said
'period length', so it made sense that the additional variable be named
that as well.

Each reference to *.periodSize has been changed to *.periodLength.

This commit continues PR #926.

strategies. There is a callback function in engine.js which sets the
options as defined in a strategy. The strategy objects were not
updated to have a periodSize option, only a period option. So,
the periodSize attribute was not being set. This caused the
execption in this bug.

This commit adds a second option, named 'periodLength'. The name
'periodLength' was chosen, rather than the previous 'periodSize' for
consistency; the description for the --period option already said
'period length', so it made sense that the additional variable be named
that as well.

Each reference to *.periodSize has been changed to *.periodLength.

This commit continues PR DeviaVir#926.
Copy link
Owner

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DeviaVir DeviaVir merged commit 278455d into DeviaVir:master Dec 20, 2017
@dsrikanth
Copy link
Contributor

dsrikanth commented Dec 20, 2017

@haxwell Thanks for doing this! Do you see changes needed on the backtester scripts?

@efams
Copy link

efams commented Dec 20, 2017

Thx, now it's all ok ;)

@efams
Copy link

efams commented Dec 20, 2017

If i use --strategy stddev returns me the same error "Error: invalid bucket size spec: undefined"

haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
strategies. There is a callback function in engine.js which sets the
options as defined in a strategy. The strategy objects were not
updated to have a periodSize option, only a period option. So,
the periodSize attribute was not being set. This caused the
execption in this bug.

This commit adds a second option, named 'periodLength'. The name
'periodLength' was chosen, rather than the previous 'periodSize' for
consistency; the description for the --period option already said
'period length', so it made sense that the additional variable be named
that as well.

Each reference to *.periodSize has been changed to *.periodLength.

This commit continues PR DeviaVir#926 and DeviaVir#940. Third time is the charm :)
haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
In testing for PR DeviaVir#940, I discovered that the dependencies necessary to
run backtesting were not in package.json. This commit adds them.
haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
…ng instances of --period to --periodLength
haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
…ng instances of --period to --periodLength
haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
haxwell added a commit to haxwell/zenbot that referenced this pull request Dec 21, 2017
…rs, renaming instances of --period to --periodLength
@haxwell haxwell mentioned this pull request Dec 21, 2017
@haxwell
Copy link
Contributor Author

haxwell commented Dec 21, 2017

@dsrikanth Thank you for mentioning the backtesters; I didn't know they were there.

@efams A likely excuse, I know, but the filter I was using to find where to replace strategy option definitions for --period, missed stddev, and two other strategies. I did a more manual search, to get all the occurrences.

I've submitted PR #960 and #961 to address both the above points.

Thanks for your patience, everyone.

DeviaVir pushed a commit that referenced this pull request Dec 21, 2017
* In addition to the options on a command, there are options on
strategies. There is a callback function in engine.js which sets the
options as defined in a strategy. The strategy objects were not
updated to have a periodSize option, only a period option. So,
the periodSize attribute was not being set. This caused the
execption in this bug.

This commit adds a second option, named 'periodLength'. The name
'periodLength' was chosen, rather than the previous 'periodSize' for
consistency; the description for the --period option already said
'period length', so it made sense that the additional variable be named
that as well.

Each reference to *.periodSize has been changed to *.periodLength.

This commit continues PR #926.

* In addition to the options on a command, there are options on
strategies. There is a callback function in engine.js which sets the
options as defined in a strategy. The strategy objects were not
updated to have a periodSize option, only a period option. So,
the periodSize attribute was not being set. This caused the
execption in this bug.

This commit adds a second option, named 'periodLength'. The name
'periodLength' was chosen, rather than the previous 'periodSize' for
consistency; the description for the --period option already said
'period length', so it made sense that the additional variable be named
that as well.

Each reference to *.periodSize has been changed to *.periodLength.

This commit continues PR #926 and #940. Third time is the charm :)

* #926, #938, #940 - In the backtesters, renaming instances of --period to --periodLength

* #926, #938, #940 - In the backtesters, renaming instances of --period to --periodLength

* Added period and periodLength option, as they were expected for the darwin.js genetic backtest. #926 #938 #940

* #926, #938, #940 - In the (genetic) backtesters, renaming instances of --period to --periodLength
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants