Live data from Hacker News

Python For Finance: Algorithmic Trading

medium.com

141–150 of 164 posts

Re: Python For Finance: Algorithmic Trading

#141

I'm wondering... why not scala? scala gives me type-checking tools (eg dependent types) so I don't shoot myself on foot

Scala is absolutely used in finance, especially for interoperability with Java in Java-heavy firms. But it's data analysis libraries aren't as mature as the pandas/scipy stack. You'd use them for different parts of a trading pipeline.

Re: Python For Finance: Algorithmic Trading

#143
post #62

How is algorithmic trading not equivalent to astrology? Nothing can be predicted because there's way too many confounding factors.

So how do you explain this: When filing for its IPO in March 2014, it was disclosed that during five years Virtu Financial made profit 1,277 out of 1,278 days, losing money just one day.

They don't rely on technical analysis. They are arbitrage trading across different markets, where there's zero chance of losing money if you're fast enough and doing it right. That's why HFT is so popular, if you're doing it right you can't lose money.

Re: Python For Finance: Algorithmic Trading

#144
post #102

Earlier quoted context omitted.

Why do you say it's a zero sum game? If I've learnt anything from my time in finance, it's that the market is definitely not zero sum. The prices you see represent sentiment, not a hard valuation, and someone isn't necessarily losing when you gain. If you really think about it, even entire economies aren't really zero sum as our method of valuation is intrinsically subjective!

I think that the OP meant that the speculation part (trying to buy low and sell high to beat the market) is a zero-sum game. On the other hand, this zero-sum game helps companies raise capital to make real investments with real returns, and that part isn't zero-sum.

What I meant was HFT as I (and how I think the 'common person') understands it is that trading is basically a zero sum game since trading doesn't really help a company raise money over very short time periods, but investing is not a zero sum game where you're looking for stocks to go up over the long term.

Where I think HFT is zero sum is your competing against other HFT people to more accurately and quickly predict the future in the very near term, then buy & sell in a very short period. And since the market changes all the time, these algos must change to stay profitable over time as the competition improves their algos to beat you. Algo trading might work in markets where HFT isn't big yet, but most people won't know which markets that is or how to actually trade there, and if you get good enough to make successful models, you're basically in the industry, it's probably way more than a hobby at that point.

Re: Python For Finance: Algorithmic Trading

#145
post #81
post #45

The main issue I found in algo and financial aspects of programming is that the market is a zero sum game, and my intro knowledge of finance and algorithms, even when I know python, are no match for MIT PHD Quants who does it full time. There's no real way to compete with that, and therefore I would lose money, even if the data showed it might be successful in the future, firms and full time workers on algo trading w…

An economist and a normal person are walking down the street together. The normal person says “Hey, look, there’s a $20 bill on the sidewalk!” The economist replies by saying “That’s impossible- if it were really a $20 bill, it would have been picked up by now.”

My favorite response to this:

"OK, how many times have you seen a $20 bill on the sidewalk???"

Re: Python For Finance: Algorithmic Trading

#146
post #145
post #81

Earlier quoted context omitted.

An economist and a normal person are walking down the street together. The normal person says “Hey, look, there’s a $20 bill on the sidewalk!” The economist replies by saying “That’s impossible- if it were really a $20 bill, it would have been picked up by now.”

My favorite response to this: "OK, how many times have you seen a $20 bill on the sidewalk???"

My answer would be "heaps of times". Different currency (GBP not USD) but still I saw £20s and £10s a lot

Re: Python For Finance: Algorithmic Trading

#147
post #146
post #145

Earlier quoted context omitted.

My favorite response to this: "OK, how many times have you seen a $20 bill on the sidewalk???"

My answer would be "heaps of times". Different currency (GBP not USD) but still I saw £20s and £10s a lot

I can't say the same, but fair enough :)

(I actually heard this response with a $100 bill as the example, which would make it even less common).

Re: Python For Finance: Algorithmic Trading

#148
post #99

Earlier quoted context omitted.

> -15% or so (of the position, not the portfolio). Oh... HUGE difference. What percentage of the portfolio is the position? How long have you run this strategy; I ask because those are huge returns that indicate to me you're taking huge risk which can work short term but nearly always wipes you out over a sufficient amount of time. > It earns between 3 - 15% in options trading every few days with a win rate of around…

> Oh... HUGE difference. What percentage of the portfolio is the position? How long have you run this strategy; I ask because those are huge returns that indicate to me you're taking huge risk which can work short term but nearly always wipes you out over a sufficient amount of time. No single position can be more than 10% of the portfolio, there is no limit on concurrent positions, and the strategy cannot use more t…

What platform are you using? Do you pay for each trade?

Re: Python For Finance: Algorithmic Trading

#149
post #102

Earlier quoted context omitted.

Why do you say it's a zero sum game? If I've learnt anything from my time in finance, it's that the market is definitely not zero sum. The prices you see represent sentiment, not a hard valuation, and someone isn't necessarily losing when you gain. If you really think about it, even entire economies aren't really zero sum as our method of valuation is intrinsically subjective!

If you aren't changing the sentiment, then it is a zero sum game based on the current sentiment. Adjusted to average growth of stock market (and inflation), it is a zero sum game. You aren't creating value by predicting the future. Just like you don't create value when you predict which lottery ticket will win.

As it turns out, there are at least 2 ways you can create value to society here:

1) Reduce spreads.

2) Stabilise prices.

Now, whether it makes any sense to put to work all those bright minds for these purposes, is a question the society should have asked some time ago...

Re: Python For Finance: Algorithmic Trading

#150
post #58

Earlier quoted context omitted.

Even if it's a zero sum game (which it's not), most participants are not quant/algo based. As long as you can beat 50% percentile, you can make a profit. Sure you may not be as profitable as top quant companies, but do you really mind that much?

Why on earth do you think the top quant companies will leave alpha on the table for you to snatch up? That sounds too much like wishful thinking to me. Furthermore, if someone is really smart enough to beat the market consistently why on earth would they trade just on their own personal account? Work for a hedge fund and use other people's money to leverage your bets.

Strategies have varying degrees of scalability. It's possible to find consistent returns on a personal scale that would be unfeasible to scale to $100M+ portfolios
Post reply on HN