Show HN: Bateman, a stock trading system I'm working on
1–10 of 53 posts
Re: Show HN: Bateman, a stock trading system I'm working on
#2Re: Show HN: Bateman, a stock trading system I'm working on
#3I understand this is an intellectual exercise, but for those considering going into algorithmic trading, those words are dangerous:
- what transaction fee model is being used? Almost all profitable day trading strategies trade too often that the profits and adverse selection reserve are decimated by commissions and taxes.
- have you tried to approximate the presence of your own trade? For example, if you sell a boatload of google shares, the price will start falling. Even with more liquid issues like AA it doesn't take much (5K shares) to rock the boat.
- Have you considered the spread? It's unprofitable to quote a penny spread on google or other high-dollar names (the SEC tax alone, roughly $25 per $1M sold, doesn't allow for really profitable market making without at least 3 cent spreads.
There are many more questions, and for each question there are hedge funds and prop shops that have lost significant amounts of money, or were driven out of business, due to an oversight.
Re: Show HN: Bateman, a stock trading system I'm working on
#4Re: Show HN: Bateman, a stock trading system I'm working on
#5I would suggest trying out-
1. market neutral positions. Eg- If you go long AAPL, go short XLK ( The tech stock ETF). 2. going long slightly out of the money call options instead of stock. ( If the options are liquid)
I mostly do stat arb, and for back-testing, even I tried Metatrader, Quantopian and several other platforms and didn't think any of them were suitable. FXCM's Strategy Trader is worth taking a look at. It can only trade forex live through FXCM, but you can import CSV data and back test on whatever you import.
Re: Show HN: Bateman, a stock trading system I'm working on
#6While far from a silver bullet these can help you avoid buying positions when the market is hopeless, or trying to play a statistically losing game. It might be worth testing.
Make sure you include all trading fees and software license costs in your models.
Re: Show HN: Bateman, a stock trading system I'm working on
#7Someone should hire you just for your ability to write documentation for your projects.
Re: Show HN: Bateman, a stock trading system I'm working on
#8- trading commissions & fees - capital gains taxes - currency exchange (for those of us "unamericans")
then all of a sudden blammo, I decided I'm better off putting "investment" cash into my mortgage
Re: Show HN: Bateman, a stock trading system I'm working on
#9However, from experience developing and testing algorithmic trading systems I can tell you that your strategy probably has some issues in its current form. I haven't looked into the code but from your description it appears you (correct me if I'm wrong): 1.) Pick a stock 2.) Use PSO to figure out the parameters 3.) If profitable, run the strategy on the stock with the optimised parameters
This means you're making a well known error in the system development community which is curve fitting parameters to historical data. This'll look very good in the simulations, but there is a high probablity that it will break down when trading it forward with real money, because it is optimised for the past. This is why there are a couple of widely accepted best practices when it comes to developing and testing trading systems.
First of all, your system should not have or need too many parameters. As a rule of thumb a robust system shouldn't have more than a handful of parameters and it should ideally show profits in simulations without a great deal of optimisation on those. When optimising make sure that the optimised parameter values are robust. This means that changing the value by a small increment only changes the resulting performance of your system by a small margin (somewhat analagous to numerical stability). If the performance changes by a big margin, then those values aren't robust and should be discarded. Furthermore, don't run optimisation on all of your historical data. Instead, optimise on portion of that data (the 'in-sample' data) and then test the optimised parameter values on the more recent data your didn't optimise on (the 'out-of-sample' data) and see if the performance of your system stays the same or breaks down. Another popular approach is 'Walk forward optimisation' [1] which takes the above one step further by repeatedly optimising and forward-testing on your historical data to find robust parameter values.
Some other things to consider: You need to factor in transaction costs, spread and slippage (the difference between the price you enter the order at and the price at which you get the fill). Transaction costs are easy to determine. Spread and slippage only apply when using market orders and can be reduced by trading with limit order if your system isn't negatively affected by this. Trading with market orders in a fast-moving market may incur siginificant slippage and there are predatory HF algos out there making money from screwing you on your execution. To get a better sense of this, it is considered a best practice to run your simulations on a lower timeframe than the one your system is supposed to work on in order to eliminate inaccuracies in the results. Ideally, you run simulations against unfiltered tick-by-tick data and additionally used bid and ask data series to factor in the spread. This may, however, be overkill and not needed for a system that runs on a daily timeframe, but it may make all the difference for a faster system.
Re: Show HN: Bateman, a stock trading system I'm working on
#10Interesting project. I haven't had the time to look at your project in-depth, but keep in mind most retail traders are at a disadvantage due to routing. Most orders are routed through providers such as Getco or Knight Capital, and often you are not aware of whom your counter-party is. Therefore, any expected P&L may vary by x amount of basis points, due to latency and liquidity.
>buy stocks that are going up intraday and sell them higer
to be blunt it seems interesting, and I would encourage you to work on it further because complex systems rarely work right. but also bear in mind that its not any different than a candle stick trading strategy, or ichimoku clouds. The key is how fast you converge to usable parameters (time,money,trades), if you can do this fast the underlying strategy can be a multitude of things, and thats my 2 cents...