SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : The Art of Investing
PICK 45.22-0.1%Nov 6 4:00 PM EST

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
Recommended by:
ajtj99
Arran Yuan
Johnny Canuck
From: Sun Tzu9/29/2025 11:25:37 AM
3 Recommendations   of 10534
 
A word on how I design my algorithms.

I keep them simple. Here's what I mean by "simple":

Suppose you look at some indicator or component of an indicator and you don't like how behaved/misled you in a stock. You realize that the issue was that a spike had an outsized effect on the moving average that lasted too long. What will you do?

The standard response is to either filter out the outliers via standard deviation or to use rank based metric (e.g. use median instead of average).

There's nothing wrong with either approach so long as you know what you are doing. Using rank or statistical filtering is a simple way to add robustness to a function. The problem is how people deal with the side effects and try to have their cake and eat it too.

The side effect of either of above approaches is that you lose the mathematical anchoring that a simple average provides. That will have ripple through the rest of the system. So it will break some other part of your algo.

How most people deal with that is by fine tuning the system and curve fitting via backtesting. They will use a distance from the mean when filtering the outliers or multiplying the median by some factor (perhaps by the ratio of mean to media) and so on.

I don't do this kind of thing. Instead I think logically about what I want and why and how important that is and under what circumstances. I tune the logic, not the parameters.


Say I want a better moving average. Instead of filtering based on median or standard deviation, may be I should do statistical analysis on the volatility and adjust the length of the moving average based on the volatility. Hypothetically this could mean to set the moving average duration inversely to a 10% move in the stock. This way sharp moves are dampened because the moving average lengthens but when the stock is range bound the moving average is short and captures breakouts.

Just as importantly, I don't aim to use this smart moving average for everything. It is designed to help with sizing and stoploss and that is all it will do. It will not be a replacement for where the average price is and decide the entry/exit points based on price. For that, SMA or VWAP is a better measure.

So in summary, at the risk of sounding too cocky and arrogant, my indicators succeed because I am better at judging what works and when and why whereas most people chase after some magic crystal ball without understanding the side effects of the complexities they introduce. They just curve fit to the stock and end up overfitting to the past rather than understanding the limits of their tools (and their knowledge).


And now, this: Message 35276439
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext