Live data from Hacker News

Show HN: Trade stocks from the command line with no commission

gitlab.com

121–130 of 170 posts

Re: Show HN: Trade stocks from the command line with no commission

#121
post #64

Earlier quoted context omitted.

Do you recommend that book and/or any others? Interested in automated trading + functional languages

I read it quite a while back, so memory is a little hazy. It's one of the few books (perhaps the only one I've found) that approaches this subject matter from the perspective of an engineer wanting to architect their own system from the ground up, and potentially work for themselves or in a firm. But, going in, you should know that it focusses less on trading techniques and more on software architecture. What data st…

Excellent. That sounds like something I'd really enjoy. I don't work in the space, but I'm more interested in the trading systems than the algos, primarily. After all, I'm a little skeptical about my ability to beat the PhDs with their institutional nukes while I'm over here sharpening a dagger.

Re: Show HN: Trade stocks from the command line with no commission

#122
post #104

Earlier quoted context omitted.

FIX is just a protocol template. Vendors will make non-standard extensions to it. For example: OCO you send to CQG won't work with StoneX.

Is there a open source framework/application in go or rust based on FIX protocol? In forex quite a lot broker offer FIX apis(because MT4 is using FIX). The use case would be to have only one application to watch/place orders simultanously on 2-3(...multiple) broker accounts. To spread risk of losing funds in case a broker goes bankrupt (or whatever reason).

I did not know that MT4 uses FIX!

But I can't speak for Rust or Go. If there isn't one already, there really should be...

Re: Show HN: Trade stocks from the command line with no commission

#123

You should know in general, though, that no one trades "for free" despite what brokerages say. Your order gets routed, delayed, placed differently, and while you may not immediately see it, your trades are getting a different result than if you explicitly paid a brokerage who charges a commission on it. Learn about "payment for order flow".

> your trades are getting a different result than if you explicitly paid a brokerage who charges a commission on it.

Yes...the average retail customer submitting a market order will generally get a better fill with PFOF. This is what most people don't usually mention when talking about those terrible high-frequency trading firms.

E.g. if a stock is trading at 10.00x10.10 and I submit a market buy via Robinhood. Citadel or someone else is going to pick that up and sell it to me for, probably, 10.08 or 10.09. Not the 10.10 I would've paid on the open market hitting the offer. It's in fact illegal for me to get a worse (higher) fill than 10.10.

Re: Show HN: Trade stocks from the command line with no commission

#124
post #104

Earlier quoted context omitted.

Is there a open source framework/application in go or rust based on FIX protocol? In forex quite a lot broker offer FIX apis(because MT4 is using FIX). The use case would be to have only one application to watch/place orders simultanously on 2-3(...multiple) broker accounts. To spread risk of losing funds in case a broker goes bankrupt (or whatever reason).

I did not know that MT4 uses FIX! But I can't speak for Rust or Go. If there isn't one already, there really should be...

Not the MT4 client but the backend seems to use fix according to: https://blackbullmarkets.com/en/platforms/fix-api-trading/

"...MetaTrader 4 (MT4) is the FIX application that BlackBull Markets uses."

Re: Show HN: Trade stocks from the command line with no commission

#126

Earlier quoted context omitted.

Of course, and in practice you basically always need to tweak your FIX layer when connecting to multiple brokers. Whilst there will be differences, you can rely on a surprising amount being uniform. The general session/authentication flow and serialisation mechanisms will be largely the same. Or the use of standard fields ClOrdID, or OrderQty. Or the "general" meaning of the messages NewOrderSingle or ExecutionReport…

I have direct experience building the fix layers for integrating a variety of exchanges. I think FIX is a net negative. The standardization provides so little, there are so many murky edge cases in each implementation and the protocol encoding is so bad, I’d rather just program against the proprietary API. On the exchanges at least the binary APIs make so much more sense.

I wish exchanges would do like Eurex and release a C header of structs representing their binary protocol.

Unambiguous, no transcription errors from an obnoxious PDF, none of FIX’s stupid design.

Re: Show HN: Trade stocks from the command line with no commission

#127
FYI: "With no commission" is a bug, not a feature. Typically, when you pay commission, you get better prices. Let's say you buy 100 shares of SPY at Interactive Brokers. You pay $1 commission and get it for 268.28. At a free-of-commissions broker, you might get your 100 shares for 268.30. That's $1 more than the trade at IB. TNSTAAFL.

It's exactly like how duck typing took over programming in the last decade or so with, "Whee, see, less typing!!", and we lost the value of having static types ("strong typing"). Why are we tempted so easily? Now we have the horror of Javascript everywhere. Even the Node.js founders recoil from their own creation and are going a step in the right direction with Deno.

Re: Show HN: Trade stocks from the command line with no commission

#128
post #19

What's really cool about Alpaca is the integration with zipline via pylivetrader. This means that you can take your backtested factor models and easily convert them to live trading. Also, they have pretty lax margin requirements. You can borrow 2x the cash you have, 4x for intraday if you're a pattern day trader, and the maintenance requirement is only 25%. And with zero commissions, suddenly it's possible for the av…

Do you have any reference on `legit factor stats`? I do not understand how leverage will be beneficial. Leverage will also multiply the potential downside risk after all? I would like to understand more how the trading cost would make up for it on average.

Re: Show HN: Trade stocks from the command line with no commission

#129

FYI: "With no commission" is a bug, not a feature. Typically, when you pay commission, you get better prices. Let's say you buy 100 shares of SPY at Interactive Brokers. You pay $1 commission and get it for 268.28. At a free-of-commissions broker, you might get your 100 shares for 268.30. That's $1 more than the trade at IB. TNSTAAFL. It's exactly like how duck typing took over programming in the last decade or so wi…

Are you saying that alpaca charges a commission on trades by inflating the price and taking a cut?

Or through what mechanism do commissioned trades get lower prices?

Re: Show HN: Trade stocks from the command line with no commission

#130

FYI: "With no commission" is a bug, not a feature. Typically, when you pay commission, you get better prices. Let's say you buy 100 shares of SPY at Interactive Brokers. You pay $1 commission and get it for 268.28. At a free-of-commissions broker, you might get your 100 shares for 268.30. That's $1 more than the trade at IB. TNSTAAFL. It's exactly like how duck typing took over programming in the last decade or so wi…

Are you saying that alpaca charges a commission on trades by inflating the price and taking a cut? Or through what mechanism do commissioned trades get lower prices?

Free brokerages generally don’t execute orders as quickly in order to sell order flow which allows HFT firms to front-run your trade. If you’re a buy and hold investor, the fractions of a cent you’re losing don’t matter much over the long run but the issue is still there. Generally when you pay for something, it means that somebody is beholden to you if there’s issues. Robinhood et. al. are free because they suck.

https://www.cnbc.com/2020/03/09/robinhood-app-down-again-dur...

Post reply on HN