Stock Prediction using Decision Tree: Risk Management

This post is the last one of a series on using decision tree for stock prediction. Here are the first, second, third and fourth posts. This final post is dedicated to the risk management part of the system.

At this step, we have as input a list of transactions containing the ticker name (e.g. “MSFT US Equity” for Microsoft, etc.), the date of transaction and the quantity. As the system is “long only”, the quantity is always positive (+1 means buy one stock).

The risk management is informally defined here as a way of managing a portfolio by closing it in certain specific situations. In this system, a simple take-profit/stop-loss at the portfolio level is used. Every day, a number of transactions are carried out. All transactions in the same day are gathered in one portfolio. At any time, the portfolio return is calculated to check for both the take-profit and stop-loss limits. If the portfolio return reaches the take-profit (e.g. +5%) or the stop-loss (-20%), it is closed.

In addition, each portfolio is subject to a maximum number of days of conservation. When this number of days is reached, the portfolio is closed. To find the best values for the take-profit, stop-loss and number of days of conservation, a three-dimensional grid search is performed. Note that there is nothing to prevent the system from overfitting at this step of the methodology (unlike the decision tree step that uses cross-validation). This could of course be improved.

Share
5 glitches way creepier than any video game is on purposeWHAT CHANGED: Very little has changed on the offensive side for the Cardinals, who return every player who either gained a yard or scored a point for their top ranked offense last Cheap NFL Jerseys season. (All 23 of their coaches returned, too.) Needing to beef up its pass rush, Arizona traded for New England outside linebacker Chandler Jones, and used a first round pick on defensive tackle Robert Nkemdiche. There have cheap nfl jerseys been changes in the Arizona secondary, with the addition of safety Tyvon Branch, and subtraction of safety Rashad Johnson (Tennessee) and cornerback Jerraud Powers (Baltimore). You just can’t keep a good, hairy beast down that is, unless it’s allegedly real, and it’s supposedly dead. The year got off to a big, Bigfoot start, with promoter Rick Dyer claiming to have killed one of the beasts and was taking the body on tour for the public to pay and see. Problem was, when push came to shove, Dyer apparently couldn’t get many venues interested enough in his Bigfoot traveling show, and it ended up being a no show. And if you like it thicker, because that runny, use more glue. Basically they just took a bottle of glue and squirted it into an old jar with a lid so they cheap football jerseys could save the rest for later if needed. Then to ensure they used the same amount of water, they just filled the bottle with water and squeezed that in. All eyes are now on Ms cheap nhl jerseys Brody, who did not tip her hand as she briskly conducted the hour of oral arguments. “I’ll rule when I sort this out for myself,” she said as she wrapped up proceedings. That could take days, weeks, or even months, with a virtual certainty of an cheap football jerseys appeal, whatever her decision.. I had been raised in a staunchly Roman Catholic family, and my father, who died when wholesale jerseys I was 20, was fiercely anti abortion. One of my earliest memories is of marching with him and my siblings on a pro life rally. Dad led us to believe that abortion was evil and that an unborn child’s right to life was paramount.. The studies on this have been mixed, but it actually looks like the reverse may be true (sorry, my fellow women!). One interesting study showed that the more “core housework” (cooking, cleaning, doing laundry) a man cheap jerseys did, the less frequently he had sex. On the other hand, the more “manly” chores he did (car repairs, lawn work, paying bills) the more sex he had. Are u kidding me? You can have nuts join any organization. Then u can have the major media make it look like what it is not. Remember the T Party???? The fact is if it gets people to prepare a little bit, be able to defend themselves unlike those poor souls in New Orleans, it was worth it.
Share

Comments

5 Comments on Stock Prediction using Decision Tree: Risk Management

  1. kumar on Sat, 14th Feb 2009 8:02 am
  2. hi,
    I’m new to data mining.can any one help me to work with stock prediction.i don’t have a clear idea about the stock prediction algorithm.provide me some useful links or methodologies.mail me is possible.my id is kmkumar.mech@gmail.com.

  3. Sandro Saitta on Mon, 16th Feb 2009 3:57 pm
  4. I have sent you some articles by e-mail. Hope it helps.

  5. mark on Fri, 7th Aug 2009 5:48 am
  6. Can I get a list of articles related to this topic as well?
    Also, what tool(s) are you using for this task?
    Do you have any suggestions for which learners are best suited to this task?
    Are you using any feature selection to ascertain the value of the indicators you have chosen?

    Thanks
    trading@arxveritatis.com

  7. Sandro Saitta on Sun, 9th Aug 2009 11:59 am
  8. @mark: I had these articles when I was working in finance. I think the easiest is that you try to get a copy of “data mining in finance” (the book contains many article references).

    Regarding the tools I was using R (rmetrics library). I had only tried decision tree. But I think, you should try to work with time series techniques. Using decision tree, the features where implicitly selected by the tree, so no, I wasn’t using any other feature selection technique.

    Hope this helps.
    Regards.

  9. Stock Tips on Mon, 30th May 2011 3:32 am
  10. Good Stuff ! I really like your post and i definitely bookmark your

    post and will give links to my friends as we all are a great lovers of

    blogs and always ready to read interesting and informative blogs. So

    Thanks ! for sharing your post.
    Stock Tips

Tell me what you're thinking...





  • Swiss Association for Analytics

  • Most Popular Posts

  • T-shirts, Mugs & Mousepads


    All benefits given to a charity association
  • Data Mining Search Engine

    Supported by AnalyticBridge

  • Archives

  • Reading Recommandations