16 Comments
User's avatar
Scott Walk's avatar

Excellent work; I have done somewhat simpler loops before the age of AI, and they added value as learning foundations.

I have some ideas where you could take this for likely much better alpha, if you want to chat at some point.

Expand full comment
Stuart Farmer's avatar

👍🏼👍🏼

Expand full comment
Anonymous123421's avatar

Amazing content haha🤙

I’m also curious on how u set position size for ur strategy, look forward to that !

Expand full comment
Stuart Farmer's avatar

Thanks! The way these systems work is that they are portfolio allocation problems. So the equity curve you see is accumulated multiples (1 -> 2 indicates 100% growth).

A 'position' is a set of weights that adds up to 1 such that each time step describes how the proportion of your total capital you're putting into each stock.

Example:

You're trading AAPL, MSFT, GOOG. You start with 25% in AAPL, 25% in MSFT, and 50% in GOOG. Your position will be [0.25, 0.25, 0.5] as it adds up to one.

These algorithms take your current position and modify it based on the rules. So, one strategy might say 'bump up allocation into MSFT' at which point it would proportionally adjust the weights.

If the algorithm weights MSFT more heavily or 'predicts' that we should by 10%, your weights would then look like 20% in AAPL, 35% in MSFT, 40% in GOOG, or [0.2, 0.35, 0.4].

Hope that's clear!

Expand full comment
Anonymous123421's avatar

I seee, thanks alot!

Expand full comment
Stuart Farmer's avatar

Happy to help!

Expand full comment
Chain-of-Alpha's avatar

Thanks for sharing...very interesting strategy generation pipeline....

Remind me of my previous experience of using genetic programming to automate alpha mining, though gp is usually highly uninterpretable...

Expand full comment
Stuart Farmer's avatar

Thanks man! But yeah, I wrote some hardcore GP code for the first preliminary version of this and realized that the LLMs are actually a better route.

Now, I have a ton of potential 'operators' and 'primitives' because I know which ones work. I think from here I could create a GP system and have more success. I also was trying to search across a scope that was just way too large. I did find some really interesting systems, however.

Maybe I'll get back to it...

Expand full comment
Siddharth Datta's avatar

Can anybody please provide a selling strategy recommendation or guidance for Indian markets?

Expand full comment
Vik’s Opinion's avatar

Another Fantastic Tool for Retail Traders is Here!

https://vikopine.substack.com/p/another-fantastic-tool-for-retail

Join for LIVE Trading and regular market updates in Substack chat room.

https://substack.com/chat/894242

Expand full comment
Quantish's avatar

Love it. The alpha mining approach makes me think of me SQX (strategy quant) I used this a lot some years back, but with some LLM flavor - right up my alley 😎. Thanks for the consistently good content!

Expand full comment
Paul's avatar

Hi, looking forward to testing some out... subscribed a couple days ago and no access to the Google Drive yet. Check messages please.

Expand full comment
Stuart Farmer's avatar

Hey I think I added you to the drive this morning. Can you double check?

Expand full comment
Paul's avatar

I'm logged into google via that gmail.com addy I sent you, but the link still tells me Access Denied.

Expand full comment
Paul's avatar

And... thanks so very much, the invite came through, the email verification went smoothly and I'm in.

Expand full comment
Stuart Farmer's avatar

Great! Glad you got it

Expand full comment