Various Principles On Decision Trees in Stock Trading

A trader has to take many decisions and over a period of time he develops wisdoms, principles, strategies, trade plans and actions them out. This is an attempt to layout a structure.

A wisdom is a fully defined decision tree

A wisdom is a decision tree of principles
a principle is a decision tree by itself
When principle meets data decision is derived
A decision is a product of a decision tree
A decision tree is a product of a decision
My actions are my revealed preferences
my revealed preferences are my decision trees
Sometimes i learn new behaviours , those are decision trees I added to me

A strategy is a decision tree with environmental inputs defined- either as constraints or as incoming datapoint.

Choice has a basis or a reason.

Reasons are deterministic datapoints.

All sets of choices during a transaction I can make defines a decision tree.

A trading plan is a defined decision tree for a strategy.

Where ever there is an option, there is a decision tree.

A sample transaction decision tree

Chosen Instrument is a given starting point. A state of environmental variables is a given — CMP, OI, Order Book, values of various indicators, capital, allocation, bucket positions etc.

Buy-Sell is a choice.

Buy — new entry or exit , if exit — partial or full

Sell — new entry or exit , if exit — partial or full


Then trading terminal offers MIS/NRML , Market/Limit/SL/SL-M , Day/IOC, Regular/BO/CO/AMO. The user makes choices along this transactional decision tree. Every choice made from a group is every other choice not made.

Price & Quantity are also choices, which we’ll currently not include in the decision tree for simplicity sake.

Event: The event that happens post which one branch of the bayesian tree is irrevocably chosen. e.g. The buy transaction based on above choices.

Outcome: Let us for simplicity sake tie up value of a decision tree to a single quantifiable outcome and see various values for this outcome over a defined time frame. e.g. over next 1 hour, next 4 hours, today, this week, this month, matching with usual trading timeframes. Outcome starts after event occurrence. The outcome is calculated for the branch actually taken.

Alternate Outcomes: The outcomes calculated for each unique branch of the tree that could possibly have been taken.

At various timeframes, the value of outcome and alternate outcomes are compared. At various timeframes, there could be the chosen path or any one of the alternate path that has a better pay-off. These values form the basis of further analysis.

Consider a sample case for answering should I put market order or limit order while trading in cash/F&O segment, which decision is better.

At the timestamp of such a trade being executed- there is environmental data like order book, LTP, and subsequent tick data that allows one to build

X = entry price at limit order since subsequently LTP ticks show whether the limit order would have been executed or not and after how long.

Y = market order that results in picking off best bids

A difference between X & Y indicates cost of market order. Consistent positive difference indicates amount of overcharge due to market order and used to calculated probability and show recommended trade as limit order in case of option market , as I’ve discovered.

Consider another case: should i trade intraday or carry my trades?

Often intraday traders receive margin financing versus carry trades that require providing for full margin. This leads to smaller trades.

I would like to answer if I was better off trading intraday and larger sizes or trade smaller with larger capital can carry the trades. What is the impact on my IRR.

With outcome payoff calculated over various time frames, we can find the difference or multiple between intraday versus day of closing event profits/losses to arrive a ratio of intraday versus carry trade profits and if the ratio is smaller than what i would have gained using margin through intraday trade- an alternate trade recommendation would suggest trade type intraday & trade quantity as larger quantity as a decision path with higher payoff.


Kaushal Trivedi

Author: Kaushal Trivedi

Pre-MBA -Programmer/Systems Analyst. Post MBA Equity Research, Infrastructure Advisory, Credit Risk Modeling etc. Then Options Trader. Developing Quant Trading Models. Developed Automated Trading Systems. Then Product Business. Then Product Design. Still subtracting the obvious, still adding the meaningful.

Leave a Reply

Your email address will not be published. Required fields are marked *