Recent submissions

Comment · 3 years ago
Do you mind sending me an email and maybe we could chat?

Thank you for your amazing comments. I really like your idea about indicators and saving state. I'll give that a try! Yeah, Marcos López de Prado is actually where I read about the tick bars and sampling at higher rates. You need like 2 phd's to read his books though. haha. I am doing this based on X number of ticks and not even looking at volume. I was using tick count as an indicator in that you can really see patterns when activity picks up. This sync issue is really really interesting and I'll explore this.

"The thing you’re actually doing is predicting what other people are going to predict." I think I've actually seen this in the data. In that you can see this mini-cycles almost when you really zoom into a fast moving stock. I'll check out. Both your comments are amazing and it 100% shows you know what you're talking about.

Comment · 3 years ago
Yeah, I haven't explored this yet. The unlimited risk thing bothers me thought. Which probably sounds funny since this whole things is risky as hell. But, I was more looking into options or something to hedge but honestly everything takes so much time to learn about, test, and then do. So, I just wanted to focus on this and then expand.
Comment · 3 years ago
Not yet :)
Comment · 3 years ago
This whole project started when I was looking for an investment adviser and didn't know anything. I was looking at all these funds that had like 4% return per year and then looked at stocks like Tesla that were up like 45% return and was like this doesn't make sense. When you dig in you see that these index funds are super super low risk. However, I like extremely high risk so I was willing to explore this a little. I don't really want to say you can get better returns, because you could end up losing all your money, extremely quickly betting on single stocks, it's basically a sure thing. So, that's why I turned to building a tool that basically bets for you. So, it's more about risk. If you put everything you had into TSLA you'd be up like 50% just in the past month but that's risky as hell. So, it's more of a risk question than a return question.
Comment · 3 years ago
Yeah, I'm heavily testing everything it writes. So, I'm very sure it's correct or get it close enough and then code it. I've seen ChatGPT add imports, functions, etc that don't even exist in Go. What I've found so useful though, is not even coding, but asking it how to solve problems, and then having it code things up. With Google, you need to pretty much already know how to solve the problem then go looking for answers. With ChatGPT you can ask it how it would solve this problem. For algorithms and stuff it have been unreal. Thanks for the warning though. You're totally right.
Comment · 3 years ago
Around 45-50% win rate but I try and keep the runners going for as long as possible and exit out of the loser trades quickly (this basically just costs you the commission on losers but sometimes more). You can tell within a minute or two if what you expect to happen is going to happen. So, even with a 50/50 win/loss rate you can still make money. I make around 100-200 trades per day. Sell everything before market close.
Comment · 3 years ago
Both? I'm getting a constant stream of data via the websocket. As data comes in it gets added to the large in-memory object, and then once I have X number of trades, I'll go and build the candlestick bar. As soon as that bar builds, it triggers the BUY loop to inspect it, and see if it matches what I'm looking for. If it does, it send a buy order out to the IB API. I'm not ranking anything. I'm just looking to see if that matches and then buy. So, I have something that tracks the total money I have, and if I have any free money (and we don't already own that stock), it makes a bet. That's the logic. I wish I had some ranking logic but that's what it's doing.

That logic is happening for 5500+ stocks all in real-time which is pretty insane. But, it works really really well. Go is amazing. At market open and close there is like 60k+ events per seconds across trades and quotes. So, that loop is processing like 60k events at times, and building each stock out, and then looking to see if we should buy/sell.

Comment · 3 years ago
Here's some simple rules. I basically just read about these and then stole the ideas. I wish I had data to back this up and it seems to be working.

- No single bet can be more than 5% of all money. The small bet sizes are what really saves your bacon in that even if a few lose 10+% you're still fine overall. - I'm also limiting the amount of shares I bet and try to keep it in the low hundreds so that I get really fast fills. - I have something that stops everything if I lose more than 1k in a day.

I don't do anything to measure overall risk or volatility. Almost everything I'm in is highly volatile. I'm basically betting as things go up and then try to cash out. Sometimes you hit the top.

Yeah, I inspect all the trades at the end of the day, well and during the day, and try to feed anything new back into the system. This is 100% manual. But, like if a single trade loses $100 or something definitely I'm in there looking at what happened.

Comment · 3 years ago
Hey, thanks. Yeah, I agree with you. That's an oversight on my end. I'll tell you here though.

I'm just using go routines and channels to talk between them and then a giant mutex for locking. That's basically it. So, as new data comes in, it builds aggregates (tick based candlesticks) as needed, this then triggers the the BUY logic loop on that new data, if something is detected, that triggers a IB API order. It is dead simple and nothing complex in here. I've had upwards of 100 positions being tracked at anyone time and seems to just work. So, I haven't messed around with complex async logic too much.

I'm actually just hard coding the parameters right into the BUY loop. This probably sounds crazy but for a small setup like this they don't change that much. So, I can run some trades, tweak things, restart, and then test some more. I imagine if you were doing that in an enterprise setting you've have some formal language and hot loading and stuff. But, for me hard coding seems to work well enough.

Comment · 3 years ago
Thank you!
Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago
Hey, I write this. I did program this in Go. The reason is that it's my go to programming language. Using it is actually a disadvantage in that the industry uses C++ and Python but that's just what I know how to program in. I wasn't trying to be misleading. Go does work really well for taking in data, doing something with it, and then calling a remote API. So, it actually works really well but if you wanted to get a job based off this it probably wouldn't help you.
Comment · 3 years ago
No way. Not even close. That would be the dream though. Taxes are insane in Canada. Like 50% insane. Housing and kids just eat money. Maybe if I was renting and didn't have a family but that's not happening.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton