Chabah on Automated Trading

Discussion in 'Automated Trading' started by Chabah, Oct 2, 2006.

  1. Chabah

    Chabah

    Hello. My handle is Chabah, and I am trying to become an automated stock trader. I have been developing my own system on paper (Word, actually), mostly as an exercise, to keep track of my learning and explore my ideas about the markets and trading.

    I work in the financial industry, but not directly in investments or finance - my background and education are as a computer programmer. I have about 10 years of investment experience, but no experience as a trader. My "trading" experience is as a poker player - I have learned that game inside and out, and was drawn to stock trading because of the many advantages it holds over poker playing. In particular, the ability to automate trading is decisive.

    There are many parallels between poker and trading, but I won't go into those since they have been explored both on ET and in the excellent book The Poker Face of Wall Street, which I highly recommend.

    My other influences include TraderMike (www.tradermike.net), the Van Tharp books, and my current read, Professional Stock Trading by Mark Conway. That last book is especially relevant because I will be automating my strategies and trading in TradeStation beginning with the system described in that book (that's why I don't need to keep my beginning model secret).

    I don't plan to include much personal information in future posts, but just so you know me a bit, I am a 33 year old man, married with one child and another on the way. I own my home but would like a larger one, I love my car but would like a nicer one, and enjoy traveling and would like to do more of it. I'm a Mac-head, so I'll be running TradeStation on a Mac. I live near Washington, DC.

    Goals:
    1: Get my trading account up an running by November 1st.
    2: Start trading December 1st
    3: Run fully automated by January 1st, 2007
    4: Post a running update here on ET

    For more background, you can read some of my infrequent blog posts here:

    http://www.whatithinkiknow.com/pokerblog/
     
  2. cool runnings man . . . i got my start on TS. Are you gonna trade stocks only?

    What kind of tests are you gonna run before hand?
     
  3. Chabah

    Chabah

    The goal of my system is to automate multiple trading strategies while using consistent and flexible position sizing and “unwinding” (closing a position). The edge of my system is that through formulaic, continual order updating we can track and exit multiple positions with much greater complexity and nuance than is possible with manual trading. This should allow us to keep losses at a minimum while allowing winning positions to run with great success.

    This system also employs a possibly unique ideal of establishing “free” positions, which are the remnants of trades that have paid for themselves. Instead of completely closing a position, we sell just enough to guarantee a small profit and allow the remaining position to run for further gains. The remaining position is not closed until the last stop loss is hit or capital is required for additional trades.

    _________________

    Comment: I am aware that the edge described - advanced closing tactics - is not a true edge. What I mean here is "edge over manual trading". I'll still need to have entry rules that give me a market edge. I have read acrary's thread so I understand the need to have better than random entry signals combined, too.

    As for the "free positions", I may jettison this idea after back testing. We'll just have to see. I'm all for new and fresh ideas, and that is one that I think manual traders would not be able to use. Note that the free positions are relevant mostly when we are trying to close positions before the market close (intra-day).
     
  4. Chabah

    Chabah

    Quick note: Excuse me if don't explicitly answer specific inquiries - I am busy working on my system. I will try to address all questions through my regular posts, though.

    Here I am using the term "system" to describe my entire architecture for trading. That architecture will be able to trade many investment products, including equities, futures, and options. I still have lots of learning to do so I am not yet sure exactly what I'll be trading - most likely I will begin with equities and add other products as I am able. Part of the appeal of automated trading is that while the system is earning I will be learning.

    Now for some definitions. I will be using these terms as I describe various strategies and tactics. Some of these imply their own utility, and others will require greater explanation - all in time. These are not all original by any stretch - I just like having terms that describe the way I see the market.

    Glossary

    Active Capital: The total amount of money being used for trading. This would typically be the account size, but it could be overridden to reflect outside holdings or to limit the risk without affecting Priority or other variables.

    Actual Risk Amount: The amount of money that will be lost if the Initial Stop is executed, calculated as (Position Size * Fill Price) – (Position Size * Initial Stop) (reverse for short positions). Note that this accounts for the actual Fill Price.

    Cash Available: The actual amount of money available to trade, including margin.

    Closing Stop: The stop-loss price used to close the position. This may also be called a trailing stop. This is generally changed as the stock runs to lock in profits without forcing a sale at a specific time.

    Cost: The amount of money lost on a trade. Also known as Loss, however I prefer to think of losses as the cost of doing business, therefore I designate it as Cost.

    Cost Stop: A stop-loss price that locks profits equal to the cost of the trade (commission + fees). This is useful to know but not usually used to unwind a position.

    Earnings: The amount of money made on a trade. Also known as Profit, however I prefer to think of profits as being the fruit of effort, therefore I designate it as Earnings.

    Fill Price: The actual average purchase price for the executed order. This must be tracked separately because poor fills may affect the system so the delta between Purchase Price and Fill Price must be monitored as part of the Review. For Limit Orders this is the execution price.

    Initial Stop: The price to be entered as a Stop Loss for the entire position, generally within 5% of the Purchase Price. This can optionally be entered as a % (Default 5%).

    Max Position Percent: A global variable used to ensure that no single position exceeds a certain portion of the Available Capital. Default is 50% (25% of buying power including 1-1 margin). This can be greater than 100% but is currently limited by the trading rules.

    Percent Gain Stop: A stop-loss price that locks profits equal to a predefined percentage gain. There may be multiple Percent Gain Stops per trade.

    Position Size: The number of units purchased (or sold short).

    Position Price: Position Size * Purchase Price (before purchase), Position Size * Fill Price (after purchase).

    Priority: The multiplier used to guide the risk percent of a position, as well as to determine which positions take precedence. Values are from 1 to 10, and multiply by .1 to determine the Target Risk Percent (10 is maximum based on trading rules). Trades of equal priority do not influence each other; however trades of higher priority can force the closing of lower priority positions if there is not enough Cash Available to execute a trade. The Priority of a position can be changed while the position is open (this will not change the position size).

    Purchase Price: The price of the stock at the time the purchase order is entered.

    Pure Profit Stop: A stop-loss price that locks profits equal to the outstanding principal (ignoring costs). For example, for 100 shares at $10, for 50 shares the Pure Profit Stop is $20. For 90 shares the Pure Profit Stop is $11.11 (90 x $1.11 = 10 x $10).

    Reduced Position Factor: The amount used to reduce a Position Size before checking the validity against the Cash Available. Default is 80%.

    Risk Stop: A stop-loss price that locks profits equal to the initial risk of the trade (including costs). For example, for 100 shares at $10 with an initial stop loss of $9.50 and a trade cost of $5, the risk is $50 + $5 = $55. The Risk Stop for the entire position would be $10.55, however the Risk Stop for half the position would be $11.10 (50 x $1.10 = $55).

    Target Risk Percent: The percent of Active Capital we aim to risk on a specific trade. This is typically indicated by the Priority.

    Target Risk Amount: The amount of money to be risked on a trade based on the Target Risk Percent and Active Capital (or can be overridden with a specific value).

    Time Stop: An order that executes, alters, or replaces another order as a function of time rather than price. For example, a Stop Market order might be altered to become a Market (Sell) order, or a Risk Stop of $10.25 might be increased to $10.50. A Time Stop can cause action at a particular time of day, can act as a timer, or can act as a combination of both (e.g. at 3 pm, begin this timer). A Time Stop is not an actual stop loss order, but more of a controlling agent for other orders.
     
  5. LT701

    LT701

    ' I am a 33 year old man, married with one child and another on the way. I own my home but would like a larger one, I love my car but would like a nicer one, and enjoy traveling and would like to do more of it.'


    Once upon a time . . . a dog managed to steal a large steak from a butcher's shop, and ran into the woods to eat it in peace. On reaching the banks of a stream, he happened to see his face reflected in the water. Never for a moment thinking that he was looking at himself in the water, what he thought he saw was another dog, holding a large steak in its mouth.
    Being a greedy dog, he jumped into the stream to snatch the other dog's meat. Of course, the reflection vanished and he could see no sign of dog or steak.

    Only then did he realize that, when he barked to frighten the other, he had dropped his stolen meat. Unluckily for him, the current was swift and the steak had been carried away. And though the dog hunted all over, he couldn't find a trace of it. Which meant, that instead of having two steaks. he was left with nothing.
     

  6. poor man's spelling of "risk".
     
  7. LT701

    LT701

    ok, how about a quote from jesse livermore then?

    "That was only one case. There isn't a man in Wall Street
    who has not lost money trying to make the market pay for an
    automobile or a bracelet or a motor boat or a painting. I could
    build a huge hospital with the birthday presents that the
    tight-fisted stock market has refused to pay for. In fact, of
    all hoodoos in Wall Street I think the resolve to induce the
    stock market to act as a fairy godmother is the busiest and most
    persistent."
     
  8. We might never begin for fear of all the potential pitfalls, eh LT?

    Let's not hijack Chabah's thread, he actually sounds interesting so far.
     
  9. LT701

    LT701

    not hijacking anything

    just pointing out something i saw, something relevant. his desire for the market to deliver what he wants, on a specified timetable

    that was one of livermores best statements, ever
     
  10. Chabah

    Chabah

    Thanks for the kind words of encouragement. Come to think of it, maybe I'll grab a couple steaks for the grill.
     
    #10     Oct 2, 2006