Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why cannot we input the 'buy/sell' size as a positive real number? #224

Unanswered
dminh asked this question in Q&A
Discussion options

Hi,
I am a newbie to the backtest. So, could you please give the link to the materials that describes the backtest formulas you implemented? I really appreciate that.

My main question, I see the requirement for the param size of the function Strategy.buy: size must be a positive fraction of equity, or a positive whole number of units. Why cannot we input the size as a positive real number, such as 4.5, 7.2, ...? I also see that size is later forced to be an integer size = copysign(int((self.margin_available * self._leverage * abs(size)) // adjusted_price), size).

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /