Hacker Newsnew | past | comments | ask | show | jobs | submit | babl's commentslogin

Is there a video somewhere of the actual talk?



The "Hello World" sample algorithm on Quantopian gets a 4000% return if it operates on AAPL for a year. It makes trades each minute using a "3 day volume-weighted-average-price." I find it hard to believe this algorithm would perform so well in the real world.

How much of an impact would factors like latency in a real world environment have on this algorithm?

https://www.quantopian.com/posts/the-hello-world-algorithm-m...


If you are trading in small lots, not very much. For the example of AAPL which has a daily volume of 20mil shares, at the current price of $450, a $450 million buy or sell order on AAPL will only be 1% of the daily trading volume.

Problem is that the bigger the ticker, the more crowded and optimized your competitors already are. The spread on AAPL options/stock is razor-thin, so using IB to do any kind of arbing/volatility/market-making trades is probably not going to be idea.

The trade-off with smaller ticker is you might have less competitors and even if it's a good opportunity, hedge funds aren't interested because potential profit is less than $1mil but for a retail guy, it's a lot. But the catch is the market is thinner, so in a volatile event, you might not be able to trade out of a very bad situation quickly. So your risk is higher.

Basically anything involving HFT where you are trading for liquidity rebates or sub-penny profits doing market-making or arbitrage, latency is critical; but 1sec tick data is an eternity already, for those operations, you need co-location to the exchanges for quotes and execution, not to mention 1mil+ trading capital for sub-penny profits/share to make sense.

1 second tick data would be more useful in swing trading situations where your profit target is 5-10% in a span of a few days to a week - it matters less if your order gets executed $0.01 less or more. So latency shouldn't be an issue.


> second tick data would be more useful in swing trading situations where your profit target is 5-10% in a span of a few days to a week - it matters less if your order gets executed $0.01 less or more. So latency shouldn't be an issue.

How stiff is the competition in that kind of trading?


The unrealistic aspect of that backtest is the total leverage - the algorithm ends up borrowing something like $700k on an initial balance of $10k.

Why not prevent this borrowing in the backtest? Quantopian's philosophy is to report the results, rather than block you from trying outrageous scenarios.

Backtests are not predictive; they are a tool to investigate the behavior of your algorithm.


If you decided to use an algorithm for real-world investing, what brokers would you recommend that have good APIs?



Thanks for the tip. Looks like they have a 10k minimum balance.


Given most brokers transaction fee model, I don't think you'd want to algo trade with much less than that.

Though iirc Collective2 lets you test strategies for free:

http://collective2.com/


Because of the volatility of returns there is a minimum amount of money needed, sums below that minimum are just going to get wiped out before they have a chance to get a buffer added. 10K lower limits are there for good reasons.


If anyone can find an api with intraday quotes and support for backtesting which doesn't require a 10K mininum please let us know!

(I know that's probably 0 brokers)


IB has an API that supports tick-by-tick historical data and real-time quotes. You might be able to sign up for a demo account and pull from their historical database. You'll have to roll your own backtester though when you build your own historical DB.

But to save you the time, applying regular ML to historical tick-data will only make you into a smarter market-maker. In usual trending or sideways equities, you'll make small amounts of money followed by a catastrophic loss due to catalyst events, earnings etc that wipes out months of money.

Perhaps the most important part of algo-design is not the ML, but tweaking draw-down and risk management.


You'll have to roll your own backtester though when you build your own historical DB.

Or you could just PR a new data source class for Zipline that pulls data from IB. Ah, the wonders of open source!


when did IB get tick data? the last I checked they just had one second bars, which are totally different.


I believe IB only requires 10k initial deposit and then you can maintain your account on 2k (+ some buffer).


I think interactive brokers is one of the common choices for people who don't have the resources/money to get direct exchange connections or similar.


IB gets you more access for less money than any other outfit I'm aware of. They narrowly missed getting Corzine'd last year. I'm glad they had the sense to walk away. http://www.futuresmag.com/2011/11/04/interactive-brokers-chi...


With 2 day shipping through the prime service, they pretty much emulate a local retailer. The prices are awesome but I can see how their tax advantages give them an unfair advantage on local competition.


Because the user that is receiving the item is tax dodging Amazon should be punished?


Not punished, just asked that they collect sales tax instead of relying on customers to pay use tax.


Look at this not in terms of a big company like Amazon, but a start up or mom and pop web retailer which would be required to collect and distribute taxes to 50 different states. What a nightmare. The "no physical presence" exemption makes sense, and is very important.


50 different states and at least several thousand distinct regions (counties, cities, townships, etc) with different sales tax rates and different taxable item classifications. You can't even tell which one a customer lives in by their address.


uhmm.. so you mean to say Walmart.com have people who can handle problem this but Amazon cannot!?

To me, the implicit 10% discount to customer seems like major incentive for Amazon to not to do this rather than the technical difficulty of the issue.

I understand a startup having difficulty spending resources doing this, but not many startups have affiliates, Also, we should be worried that Amazon will cause states to make laws which will ultimately harm startups.


This is why Amazon's management has stated several times that they would prefer a national sales tax than dealing with this mess.


Amazon ran Target.com's web store... They know well how to solve this problem because they already did it!

Complexity is a flimsy excuse for a giant like Amazon.


True, but Amazon probably makes close to a billion in annual revenue in CA, I feel like that must account for some kind of taxable "presence."


I wasn't aware anyone actually declared their Amazon purchases at tax time.


I do as well. I sum up my online purchases from Amazon, add my wife's in, and pay the money. It goes to funding the things I use: Roads, firefighters, the library, the park next to my house. Heck, there was a fire two weeks ago in the apartment building next to where I live-- we sure as hell appreciated the firemen who came at 4:00am to prevent a catastrophe.

The argument above about how it's impossible/expensive/complicated/etc. to collect sales tax seems exceedingly bogus to me especially given the nature of HN: Sounds like a business problem to be solved, not some byzantine task. Someone should go make an online sales-tax-computing web service and be done with it.

Oh wait, someone did: http://salestaxwebservice.com/, http://www.avalara.com/products/avatax/calc, et cetera.


[deleted]


I do. Amazon purchases are usually all I end up reporting, too -- not many other sites I buy things from that aren't the sites of brick-and-mortar stores (which collect the sales tax).

Especially if you are self-employed or own a business, the chances of NOT being audited eventually while never reporting any use taxes are not good.


I do.

Seriously.


clever advertising if that's the case


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: