CAT | Scatter
In the next week, we will be announcing a new automated trading platform for developers to crash test their automated trading systems. We will be offering a free account, as well as premium accounts – stay tuned for the announcement. If you would like us to email you when we release a new product, Sign-up for announcements on the form to the right of this post.
Well, I was away for a few days, my wife had a baby – great times! Sorry if there were any site problems, I noticed there were a few when I got back today.
The predictions should start working any minute now (Tuesday @ 1:30pm EST). The reason was all to do with MongoDB, some records disappeared on me. I suppose that is what you get for using bleeding edge systems. I will be converting everything over to Mysql as Mongo is way too young to be used in a production environment with things related to money (I am actually making trades with these predictions).
Speaking of Mongo… here area a few things I do not like about Mongo besides the lack of stability, and why I am going back to Mysql
- Lack of Transactions – there is simply no way to create a transaction as of yet, this is my biggest need.
- Missing Records – I lose probably about 5-10 records a week, I can sometimes get most of them back if I take the site down, and run a db.repair.
- No means to do any joins, though I must agree, it ends up much quicker this way.
- Schema-less, although this is the main reason I moved from Mysql, it is the same reason I am moving away from it. I always (usually) test my code, however, sometimes small things get missed. I noticed that some of my data was incorrect… it turned out that I had a typo in my table selector, and it automatically created another table with my typo. (More descriptive: I had two tables: Balances and Balancse). I had to create a migration program to move data from ‘balancse’ and merge it into ‘balances’ Perhaps there is a way of stopping this, but I just didn’t like the fact that it would just create anything on the fly. I am simply not perfect, and I will make mistakes, therefore, I’d rather see an error when the table, or field doesn’t already exist.
- Unstable Replication – I have had nothing but problems with the replication, however, I should admit- they do get fixed and pushed into the latest ‘stable’ version all the time.
- Not stable… after using MongoDB for a few months, I have come to the realization (which I already knew) that Mongo is new, bleeding edge, and is nowhere near stable. I am doing a server reboot every few days as there are still memory leaks on the process.
In Mongo’s defense- I really like it, and hope to use it in the future when it becomes stable. I’d also prefer an option to not allow Table or field additions unless there was another step or explicit command. The table and field creates should follow suit to at least the update/insert data rules. INSERT NEW FIELD into Collection, or INSERT NEW TABLE into Database X, etc.
My response to Mongo’s FAQ:
“When should I use Mongo?” – Always…
Whenever you don’t care if records go missing, don’t need replication, you’re a seasoned beta tester, like on the fly table/record creation, or simply like to use bleeding edge software.
Although I sound like a hater, this is just my advice to you. I will use it, when it becomes stable, but it is not currently stable in my opinion. My advice – stick with something that works, or wait until Mongo is not releasing a new version every couple weeks.
Back to the grind…
baby · mongo · nyse · predictions · problems
I was making a change today to the transaction logs, and posted a message saying they will be back up soon. Unfortunatly for everyone (but me) my wife is in labor and I won’t be able to update the site for a couple days.
The predictions are working still however, so hoping that will keep you guys interested!
I also have a big announcement to make in the next few days about a new start-up!
Stay tuned.
No tags
So today, I didn’t touch any code for the prediction model even though I still think there is a lot of room for improvement. I did some small fixes to the automated trading system. I did see two devastating bugs, and fixed them.
The first bug was in the trading system. It decided to sell a stock in effort to save future loss, but wasn’t notifying the prediction system about the bad information. After the automated sell, the buy system would then happily pickup the predictions, and see a “good-buy”, and of course, purchase it! I corrected this during my lunch at work today, however – the damage was done and it really messed my day up. There were at least 20 unnecessary trades made today equalling $200.00, not counting the multiple losses it took on the repurchase of failing stocks.
The second bug was a lot simpler, and I cannot really measure the failure of it, other than I had money sitting around doing nothing. It was not utilizing the full amount of the money in the account. It was only utilizing about 70% of the money on hand.
Though I may have taken some losses today, two bugs affected my bottom line.
I am very excited in some of the new ideas to improve my automated trading system, but, I am going to restrain from doing them all at once, so I can measure the success of each one.
On a positive note, I started on Tuesday with $100,000.00, and have only lost a grand total of $-673.00 in two days, leaving me with $99,326.92 virtual dollars! I have made some gain, however its hard to see. In the last two days and have made 94 trades that costed me $940.00. Had I not had todays bugs (and yesterdays) I think I would be sitting in the green today… not much, but it would be green!
Anyhow, tomorrow is a new day.
algorithmic trading · automated · hft · nyse · stock market · trade
Though my predictions seem pretty good, my auto purchasing script went a bit hay-wire today and started to buy and sell like crazy – this can be good, but when each trade is costing $10.00, and you’re losing money on each trade by buying the same one- it’s a bad thing.
I’ve fixed the bug I found, and hopefully, I can make up for the losses this morning before the bell rings.
automated trade · bug · nyse · stock market
15
End-to-end Stock Prediction and Algorithmic Trading System
No comments · Posted by admin in Scatter
I recently took a stab at writing an algorithm to predict the stock market, and was surprised to find out how well it worked out on my first trade day. The initial version took only 16 hours to complete, additional modifications put my time a little over twenty hours. I aggregate web sites, twitter, weather statistics, as well as do some traditional stock estimation with figures. I’m basically using event-driven arbitrage.
I am constantly making small improvements to the methods that I have implemented, and measure each change carefully. Measuring success is great, however, I wanted to actually see it perform with an automated trading system. I wrote an automated buy/sell program to purchase on the predictions (with fake money of course) in about 6 hours including testing.
I will be adding short selling, as well as an API for those who would like to play with the system as well very soon.
As I learn new and interesting things, I will post them here.
algorithmic training · event driven arbitrage · finance · stock market
