News for hackers. Stuff that matters.
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Saturday June 06, 2020 @05:12PM (#23442258)
Algotrading options. Some initial investment is needed in order to open margin account, but otherwise it's basically passive income.
Re:Ask HN: Side projects that are making money, but you'd no... by organicfigs on Saturday June 06, 2020 @09:52PM (#23444069)
I wanted to add a response here for every aspirational algotrader: you can lose a lot of money very quickly. I hobbied in algotrading through my twenties, learned a lot more than I expected too, worked out the math, and made $600 in a matter of 15 minutes on my first day before losing $1000 the same day. That's when I decided to pull the plug. I already knew that it would be more profitable finding contracting gigs then inevitably writing off 100s of hours I spent researching, doing the math, and coding over the years, but decided I would regret it if I never tried.
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Sunday June 07, 2020 @02:38AM (#23445283)
That's right, I don't advise anyone to invest more than what you're comfortable losing: besides making dumb decisions even such things as an innocuous gap in your test coverage can lead to losing everything you have in a zap. In my opinion there's also no need for margin account right away. Focus on paper trading and only invest a few hundred bucks in real account just to get the feeling of it and to realize what are the little things that paper trading misses.
Re:Ask HN: Side projects that are making money, but you'd no... by tomp on Saturday June 06, 2020 @06:24PM (#23442810)
I’m guessing that “passive income” means buying volatility & selling protection? If that’s what you’re doing, how did you fare in the recent Covid-related volatility spike?
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Saturday June 06, 2020 @07:47PM (#23443377)
I don't want to go into details on the strategies, but high volatility and high liquidity are great for options, especially for algotrading approaches ("picking up pennies in front of a steamroller"). This will be the most profitable year for many of us. In quiter times you can't get much better than the wheel, but right now certain approaches produce more than magnitude higher yields.
Re:Ask HN: Side projects that are making money, but you'd no... by marcins on Sunday June 07, 2020 @12:15AM (#23444718)
Without going into any more detail than you’re comfortable sharing, I’m just curious as to what kind of percentage return are you seeing from this?
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Sunday June 07, 2020 @02:30AM (#23445248)
It beats SPY, but I'm not leaving my job.
Re:Ask HN: Side projects that are making money, but you'd no... by jedberg on Saturday June 06, 2020 @05:14PM (#23442268)
I've been wanting to do this for a while. What trading platform do you use and do they have a good API?
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Saturday June 06, 2020 @05:44PM (#23442488)
I am in EU which limits my options (no pun intended).

1. Degiro is sort of Robinhood counterpart, but it's more expensive, does not have (documented) API and lacks access to US exchanges (for options).

2. Interactive Brokers is a heavyweight that provides API and all the bells & whistles you could ask, but it clearly expects larger accounts. I have < $100k invested right now which makes their commissions rather expensive for daytrading and there is effectively no support from them (which they don't state clearly, but none of my queries have been answered by a human).

3. ChoiceTrade is available in EU as well, but they refused to provide me API access. Their commissions (for US options) are lower than IB (for < $100k accounts at least), but the service itself has shadier reputation.

I have tried all three of these and decided to use IB. They provide two types of API. I am using a simpler one - "TWS API". It is widely used, so there is plenty of documentation and libraries. Protocol is pretty archaic and you need to run GUI Java-based app which acts as a gateway between your code and their servers, but there are documented ways to hack it for running in headless mode and performance is fine for my use case, so I didn't bother looking any ways around it. Additionally there is a second API, which is using FIX protocol that's "industry standard", but I'm not working in fintech and am not familiar with it / didn't need it so far. My understanding is that you still need to run the same local Java app if going FIX route.

That said, assuming most people here are from US, I would recommend to try starting out with either 1) Alpaca.markets (free, but only supports trading stocks) or 2) TD Ameritrade (both stocks and options). Both have modern REST API that you would expect in 21st century. Might be too limiting for professionals and definitely isn't meant for HFT, but IMO they should be sufficient for people algotrading as a hobby.

I know that there are other services as well, some specifically targeted for algotraders and some people even use reverse-engineered Robinhood API, but I can't vouch for any of these.

Re:Ask HN: Side projects that are making money, but you'd no... by z023bs on Saturday June 06, 2020 @06:55PM (#23443076)
would you be willing to share the resources you used to get started with algotrading and understanding options?
Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Saturday June 06, 2020 @07:38PM (#23443330)
There are books and courses on various strategies, but I didn't use any as it started as a hobby and trying out different approaches & finding "hacks" on my own was more fun (it turns out all of these "hacks" were known previously, who would have thought).

If you have purely technical questions, reddit has a few communities that can help and you can find more people on Discord.

Understanding stocks, options and all the financial stuff was the hardest part (for me as a non-fintech guy) as it's filled with their own lingo and large part of information available online is useless or even harmful (either coming from noobs/gamblers or "financial gurus willing to disclose their secrets for in a private webinar" or even legitimate traders that operate through textbook "cargo cult" rituals). Investopedia is a good start, but if your goal is to have profitable algorithm that does not require your attention, you will need to read and understand the rules and regulations that apply to your jurisdiction and exchanges you use. There are many somewhat obscure events that happen fairly rarely (during normal times - low volatility period, right now everything is accelerated 5x) so you might not hear about them at all until they affect you, but once they do occur you will either lose money or lose opportunity. I am going for sources (sec.gov, nasdaq.com, nyse.com - I trade US options exclusively), there might be some shortcuts (probably trainings), but I haven't tried any.

If you are just starting, try paper trading but also get a real account with real money as soon as you can (< $500 is fine and it's not like you're losing that money [outright] either), because paper trading is really just an approximation and you won't catch all the special cases through it.

If you want to be above the average algotrader - start by collecting detailed data (per minute or so) and storing it for future use. Many brokers give you access to historical data but it is very basic and good quality historical data is very expensive. Use this dataset to backtest your algorithms, but try to make distinction between features that have real-world causes, the ones that are just product of chance and the ones that are caused by market makers or other traders. Most of the trades are happening fully automatically and everybody uses basically the same few sets of approaches, so you should be aware of them to either make or avoid losing money on those somewhat predictable components.

Oh, also make sure you understand the way your broker calculates all the fees and commissions as with algotrading that can make or break the whole profitability for you.

Re:Ask HN: Side projects that are making money, but you'd no... by z023bs on Saturday June 06, 2020 @09:13PM (#23443844)
thanks so much for the detailed reply! I was mainly looking for reputable sources of information to learn from, there are so many BS opinionated websites and Youtube gurus trying to sell courses that it is very hard to find a quality source of information. I watched a bunch of Khan Academy videos but they weren't super comprehensive so I was looking to get more in depth.

what is your opinion on technical analysis and does it need to be used in algotrading? I've seen some of the basic indicators but wondering if I need something more than RSI and MACD

Re:Ask HN: Side projects that are making money, but you'd no... by aj3 on Sunday June 07, 2020 @02:30AM (#23445246)
There are some patterns that are fairly reliable such as volatility around earnings. But that's sort of obvious and only works because everybody knows about & expects it to work. What's called TI on YouTube is different kind of price forecasting altogether. In my opinion there are only three ways to predict price movement on that scale:

  1. by having insider knowledge
  2. by market manipulation
  3. by getting lucky
Obviously, I haven't taken any classes or worked for the Wall Street so might be missing some hidden knowledge, do your own research. My strategies mostly assume random outcomes and work on a scale that does not require TI, but I also attempt to detect dangerous stocks, market makers' sentiment and market manipulation (btw, cryptocurrencies are great for studying mm).
Re:Ask HN: Side projects that are making money, but you'd no... by person_of_color on Monday June 08, 2020 @12:02PM (#23457762)
Why options and not equities?