-
Notifications
You must be signed in to change notification settings - Fork 83
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
in code.java, why do the for-loops on lines 867 and 935 start at 1? #12
Comments
The motivation is that we never want to decascade the initial position. It is closed when the PNL condition is satisfied. |
Do you know whether the PNL takes into account the transaction costs before reaching the target? For example, if commission was $7 plus there was swap fees of $4 would it take these into account if the profit target was $10 ie the total would need to be $21 gross profit to have a net profit for the EA target of $10? Otherwise if a position is held onto for a long period (under the model some runners could be held onto for months or years) the swap could cause the profit to be eroded or go into negative. |
So this is a toy model where the only transaction fees are the spread you pay. But yes, if you hook this up to a specific exchange that charges fees, you would need to factor that in. Note however that in the "limit orders" version of the algo you don't pay any spread fees: |
No transaction costs are accounted for
…On Wed, Mar 21, 2018 at 5:06 AM, mailfilter888 ***@***.***> wrote:
Do you know whether the PNL takes into account the transaction costs
before reaching the target? For example, if commission was $7 plus there
was swap fees of $4 would it take these into account if the profit target
was $10 ie the total would need to be $21 gross profit to have a net profit
for the EA target of $10?
Otherwise if a position is held onto for a long period (under the model
some runners could be held onto for months or years) the swap could cause
the profit to be eroded or go into negative.
Thanks
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADI6sZWdcSqwE3prAHA-yRsFK0gD023Cks5tghgNgaJpZM4SxlOf>
.
|
This would mean the first open position never closes throughout the entire simulation.
The text was updated successfully, but these errors were encountered: