Live data from Hacker News

Introduction to Zipline: A Trading Library for Python

quantinsti.com

121–130 of 155 posts

Re: Introduction to Zipline: A Trading Library for Python

#121
post #26

Earlier quoted context omitted.

I mostly agree with this. Treating markets as an exercise purely in data science is a _bad idea_. Risking money without a solid understanding of market mechanics and trading conventions is a recipe for disaster. Taking a Bayesian view won't save you either - this is a land where some new "six sigma" event happens every six months. That said, the same logic that holds for identifying profitable strategies within an in…

I'm curious what folk's thoughts are on these two platforms: Interactive brokers offers low fee access to their platform ( https://www.interactivebrokers.com/en/index.php?f=13869 ) Quantopian (www.quantopian.com) gives you the ability to trade through robinhood with long trades at 0 commission. There has been some skepticism in the Q forums on how well robinhood's execution is (possibly the effect of a "you get what…

I use Interactive Brokers. They're probably the best retail brokerage out there. They're cheap -- the best rates on commissions and by far the best rates for margin. And they have a reasonably well-documented and supported API which you can write your programs against. The API is actually pretty much industry-standard so if you're interested in a third-party program, they probably support it.

If there's any downside, it's their data. You can't get that much of it historically (1 year max on the minute bars, far less on the second bars, and it takes forever to download it because of the throttling). It's also not...I'm going to say correct...historically. I mean, it is a correct record of what trades happened when. But it includes trades that you won't see when they happen, making it less useful if you're looking for a stream of events as they are happening. Also compared to a broker like Lightspeed (who I haven't tried) their data is expensive.

The software is a big mess, but it's usable. It's always in this weird state where it's 50-75% of the way to being completely awesome, but there's just a few things missing that stop it from being so. Also if I have one nitpicky complaint it's that I can't direct route complex options orders.

Re: Introduction to Zipline: A Trading Library for Python

#122
post #108

Earlier quoted context omitted.

This isn't true. There are a non-zero number of traders who use IB and post positive returns. For example Taaffeite Capital Management (who gained some publicity for good returns on Brexit) are a Sure, bigger funds have better market access, and it will always be impossible to implement a high frequency trading approach. But these platforms are about as good as a small player can get. [1] http://www.afr.com/personal-…

Dr. Lun has a PhD from MIT and is doing original AI research. If that's your profile then do what you want=)

Don't get impressed by credentials and buzzwords. A lot of people had and are having success without credentials. The investing, trading domain is large enough to accommodate different approaches and wide variety of skill set. It is not the domain of a few chosen or privileged ones.

Re: Introduction to Zipline: A Trading Library for Python

#123
post #85

Earlier quoted context omitted.

Zipline dev here. Zipline happily works on minutely data (in fact, we recently dropped support for daily mode entirely on Quantopian, which is built on top of Zipline). All the tutorials and examples for Zipline use daily data because there's no freely-available minutely data that we can distribute to our users.

;-) you ever review that PR I sent? No browsing HN on the Job! (I kid)

I looked at it briefly over the weekend and then got distracted trying to make numpy.isfinite() work on datetimes :(. It's still in the queue though! Feel encouraged to gently bump it if I don't get back to you in the next day or two.

Re: Introduction to Zipline: A Trading Library for Python

#124

Earlier quoted context omitted.

You vastly underestimate the complexity of a discretionary trader's intuition and experience. You cannot just replicate years of human experience with computer code so easily.

This statement is too general. You could of said the same thing about chess, there are chess Grandmasters who devote their lives to studying the game yet computers play chess at a much higher level than any human.

If you honestly think that living a real human life, with all the concurrent decisions that are simultaneously and relentlessly made on a micro and macro level throughout every second, every day is the same as a single game of chess, then by all means, go trade the stock market and show us how it's done.

Re: Introduction to Zipline: A Trading Library for Python

#125
post #84

I've typed and deleted this post a few times trying to find a way that it doesn't sound kind of pompous but if it helps save one person alot of money then screw it, I'll sound pompous.... I get asked quite a bit on how to start doing algorithmic trading and the first thing I always tell people is don't. I think I've said this many times now but the number of people who come at it with the thinking "I'm a computer sci…

The rapid rise in popularity of algorithmic trading among everyday coders, the massive growth of /r/wallstreetbets, and the popularity of Quantopian tells me one thing: Go long on retail brokers (AMTD, ETFC, IBKR)

Massive growth of wallstreetbets? Come on, I've been subscribed to that subreddit since the beginning and it's largely a joke.

Re: Introduction to Zipline: A Trading Library for Python

#126
post #108

Earlier quoted context omitted.

This isn't true. There are a non-zero number of traders who use IB and post positive returns. For example Taaffeite Capital Management (who gained some publicity for good returns on Brexit) are a Sure, bigger funds have better market access, and it will always be impossible to implement a high frequency trading approach. But these platforms are about as good as a small player can get. [1] http://www.afr.com/personal-…

Dr. Lun has a PhD from MIT and is doing original AI research. If that's your profile then do what you want=)

There are plenty of MIT PhDs very successfully losing money.

I think this goes directly to the "if you use these platforms you are a fool" comment. It seems to me that some people who aren't fools use the platforms, and some who are, don't.

Also, this is HN. Pretty sure there is more than one MIT PhD reading this, and I know there is more than one doing original AI research. Bring this comment to mind: https://twitter.com/paulg/status/28911860225 (exact comment here: https://news.ycombinator.com/item?id=35079)

Re: Introduction to Zipline: A Trading Library for Python

#127
post #75
post #53

Earlier quoted context omitted.

How about no. You're entering a field where professionals working full time struggle to beat the market, what's saying that you, a folder of 10-k's, and a copy of Ben Graham are going to beat them? You could probably spend a lifetime studying investing and still come up short, because you don't have the resources or mentoring that the pros have.

Wrong that's all you need. In fact according to Peter Lynch you have a better chance of alpha as you dont have to deal with all the bs a PM at a big fund has too.

The markets that Peter Lynch traded and the markets today are completely different.

Re: Introduction to Zipline: A Trading Library for Python

#128
post #76

I've typed and deleted this post a few times trying to find a way that it doesn't sound kind of pompous but if it helps save one person alot of money then screw it, I'll sound pompous.... I get asked quite a bit on how to start doing algorithmic trading and the first thing I always tell people is don't. I think I've said this many times now but the number of people who come at it with the thinking "I'm a computer sci…

> I mean each day 100's of Phd's... Yes, but then... "Finance novice beats hedge fund pros, winning $100k in Quantopian trading contest" https://pando.com/2015/03/05/finance-novice-beats-hedge-fund... Thousands of brilliant people are out there undiscovered and I think quantopian does a great job leveling the playing field.

Equally, there are many athletes that play at amateur/semi-professional level and suddenly they are top level starts (e.g. Chris Smalling, Jamie Vardy). So yes, it's possible. It's just that the odds are not in your favor :) should you keep chasing your childhood athlete dream because someone did it? Probably not :)

Same rules apply to your example.

Re: Introduction to Zipline: A Trading Library for Python

#129

Earlier quoted context omitted.

I never understood this. If its possible to be a profitable independent day trader, and we know it is because many are, then it should be possible to code the rules you follow and become a profitable algo trader.

> If its possible to be a profitable independent day trader, and we know it is because many are, then it should be possible to code the rules you follow and become a profitable algo trader. There's actually a logical error here: if trading results were essentially random, a certain subset of traders (including day traders) would, at any given time, have profitable records. But you would not be able to derive (and, th…

Agreed. Probably a large fraction of 'profitable independent day traders' mention by parent depend on luck. It's one thing to post a profitable month/year, whole different thing is a profitable decade.

It's relatively easy to have a profitable period on a strongly bull market. But it's irrelevant if any 'unexpected' (people call such events unexpected despite the fact that they tend to happen regularly over time) event such as 2008 crisis will completely wipe you out.

Re: Introduction to Zipline: A Trading Library for Python

#130
post #23

Earlier quoted context omitted.

Most professionals I've known use Capital IQ, which is expensive. It's surprisingly tough to get broad, machine-readable market data for free but there are some cheaper options. Check this thread: https://www.reddit.com/r/SecurityAnalysis/comments/2ci5du/ca... Or you could always scrape Yahoo Finance :)

Yeah but you don't want to spend most of your time writing and maintaining scraping code :-)

Yep, therein lies the classic problem: if you want something of value, you can either spend your time or spend your money.
Post reply on HN