Using Category Theory Concepts to Design Indicator-Based Trailing Stops
Summary
This article introduces spans, experiments, and compositions from category theory, then uses them as a framework for describing a trailing-stop experiment. It records the floating profit of a long position alongside moving-average and average-true-range values, considers lagged correlations, and proposes combining linear functions of those indicators to estimate a stop-loss distance. The same framework is extended by treating indicator inputs as composite spans, with the aim of representing additional relationships such as the effect of indicator periods.
The article reports illustrative tests on EURUSD using an hourly chart and a built-in RSI signal, including a comparison of trailing-stop variants. It characterizes one later result as weaker than the other reports while suggesting that the idea could merit longer testing. The examples and category-theory terminology provide a conceptual modeling approach, but the reported tests do not demonstrate robust predictive power or a complete trading system. The author explicitly cautions that the proposed code and strategy require independent research and diligence.
Key ideas
- A span can represent relationships between position profit and observable indicators such as moving average and ATR.
- Lagged correlations between indicators and floating profit are proposed as inputs to stop-loss decisions.
- The proposed stop distance combines indicator-based functions, initially using linear relationships.
- The reported EURUSD tests are illustrative and do not establish a robust or complete trading strategy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.