Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Stoken ACA strategy [Re: alun] #486566
09/05/22 19:06
09/05/22 19:06
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Originally Posted by alun
I think transactional costs are miserable here.


Which is why I don't believe in most active trading strategies for non-leveraged products. Passive / buy & hold strategies tend to perform better in that regard.
Maybe you can somehow adjust your portfolio and switch to futures or options?

Re: Stoken ACA strategy [Re: alun] #486570
09/06/22 08:57
09/06/22 08:57
Joined: Aug 2022
Posts: 65
alun Offline OP
Junior Member
alun  Offline OP
Junior Member

Joined: Aug 2022
Posts: 65
There are two problems with derivatives:

1. They have baked-in roll-overs (swaps) in their prices - which works agains a long term investor
2. I'm not sure if I can find all the same futures to cover short and long term bonds , real-estate etc

I believe they are more suitable for short- or midterm trading or hedging but not as replacement for buy and hold type of assets.

Last edited by alun; 09/07/22 15:35.
Re: Stoken ACA strategy [Re: alun] #486574
09/06/22 18:18
09/06/22 18:18
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Futures/options make automatic trading more complicated and yeah, there aren't always good alternatives to ETFs.

Have you compared your strategy performance with a buy & hold scenario?

Re: Stoken ACA strategy [Re: Grant] #486588
09/08/22 11:04
09/08/22 11:04
Joined: Aug 2022
Posts: 65
alun Offline OP
Junior Member
alun  Offline OP
Junior Member

Joined: Aug 2022
Posts: 65
Originally Posted by Grant
Have you compared your strategy performance with a buy & hold scenario?


I have released the next version of my script https://gist.github.com/alun/4424cb0e61a4955355ea82bb72286af3 and calculated this comparison (without reinvesting).

Stoken's strategy definitely gives better risk-adjusted results than risk-on only buy and hold (with and without periodical rebalance).

https://gist.github.com/alun/80fcedf46e64932a8f4ceb050fcd9a86#file-comparison-csv

Last edited by alun; 09/08/22 11:05.
Re: Stoken ACA strategy [Re: alun] #486589
09/08/22 12:42
09/08/22 12:42
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Nice, that's def a significant improvement, esp the % drawdown.

For a even better comparison it would be interesting when you factor in the transaction costs. This is often part of the reason why buy & hold strategies perform better.
Andrew made a nice blog post on how to incorporate realistic transaction costs in a Zorro script, see https://www.vitaltrades.com/2020/07/14/adding-exact-fee-and-credit-calculations-to-zorro/

Re: Stoken ACA strategy [Re: alun] #486593
09/08/22 16:43
09/08/22 16:43
Joined: Aug 2022
Posts: 65
alun Offline OP
Junior Member
alun  Offline OP
Junior Member

Joined: Aug 2022
Posts: 65
I wonder why the regular `Commission` in the asset list wouldn't for that?

https://zorro-project.com/manual/en/account.htm

Re: Stoken ACA strategy [Re: alun] #486594
09/08/22 17:00
09/08/22 17:00
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
You can set Commission on a trade-by-trade basis, and not on an order-by-order basis. My (overly complex) workaround from my blog attempts to address this.

In other news, you can always use Interactive Brokers' SMART Prefer Rebate or SMART Maximize Rebate routing options. With these, you can place limit orders that add liquidity, and you might actually get paid for order fills (if there are exchanges that do this for the given instrument, I think some stock exchanges do).

Re: Stoken ACA strategy [Re: alun] #486599
09/08/22 22:49
09/08/22 22:49
Joined: Aug 2022
Posts: 65
alun Offline OP
Junior Member
alun  Offline OP
Junior Member

Joined: Aug 2022
Posts: 65
Thanks for the extra input Andrew,

I think I don't need that fine control over fees right now.

But I have reused your idea to explicitly account for dividends here https://github.com/alun/stoken-aca/blob/main/stoken_aca.c#L59

One thing learned - marketVal/marketVol do not work without Zorro S - bummer.

I've hacked the price bars in the way that `close = open` or `close = open + dividends`

I'm only using close prices for my algo anyway.

That seemed to work, but results are still very far from my Python implementation.

One bug I have found - I have modified DowloadEOD.c for building .t6.
I've added a loop to build history for multiple assets. But without `dataNew(1, 0, 6);` it saved same bars for each asset name - so previous results are a way off from being correct.

But not sure about the rest - working further to get to some Zorro/Python parity...

Page 2 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1