← Back to blog

We Open-Sourced Our Indicator Engine. Here's Where We Drew the Line.

sortefi-ta: 121 indicators and 59 candlestick patterns, pure Python, MIT license. pip install sortefi-ta

Ask five charting platforms what a hammer is and you'll get five slightly different answers.

How small does the body have to be? How long the lower wick? Does it need a downtrend before it, and if so, how long a downtrend, measured how? Most tools never tell you. The rule sits inside a black box, and you only find out it differs from the next tool when your screens disagree.

That has bothered me since the day I started building Sortefi. Today we're doing something about it.

What we released

sortefi-ta is a free, open-source Python library with the technical calculations that run inside Sortefi:

  • 121 indicators across momentum, trend and moving averages, volatility, volume, price maths, statistics and support/resistance
  • 59 candlestick patterns, each defined in its own short file with the rule written out in plain words
  • Chart patterns such as cup-and-handle, volatility contraction (VCP), high tight flag and NR7
  • Divergence detection for RSI, MACD, stochastic and seven other oscillators

It's pure numpy and pandas, so there's no C library to compile and no installation pain. It's MIT licensed: anyone can use it, change it or build a business on it.

pip install sortefi-ta

Every function is tested to give the same numbers as the code running inside Sortefi today. Install and usage steps are in the sortefi-ta docs.

Why a founder gives this away

I'll be honest about the mix of reasons.

The first is simple. Building is ultimately building for people. Every trader and developer who has written an RSI function by hand, chased a bug in a smoothing formula or argued in a forum about what “below the cloud” means has spent hours on a problem that should have been solved once, in public. Sortefi exists because of decades of open knowledge: the indicators were published by their inventors, and much of the software world runs on code people chose to share. Giving back is how that ecosystem keeps working. I want Sortefi to be a company that contributes to it, not only takes from it.

The second reason is that it's good for us, and I'd rather say that plainly. Open source is how developers find tools. If sortefi-ta helps someone, some of them will be curious about what we built on top of it.

Where we drew the line

This is the part I think matters most, because it's the question every founder should ask before open-sourcing anything: what is actually your moat?

For us, it was never the indicator functions.

An RSI is a formula from 1978. A hammer is a shape traders have named for centuries. Anyone determined enough can write these, and many have. Keeping them secret would protect nothing.

What sets Sortefi apart is the harness, the AI system wrapped around those calculations. I wrote about it in The Model Was Never the Product. The Harness Is. It's the layer that:

  • turns a trader's plain-English sentence into one exact, unambiguous specification
  • decides what to do when a request is vague, and asks rather than guesses
  • grounds every name, sector and index in real market data across five markets
  • runs the generated filter safely and checks the result before you see it

That's where years of edge cases, failures and fixes live. That stays ours.

So the line is clean. The calculations are public. The harness that understands what you mean and finds it in the market is Sortefi. The library is the vocabulary; Sortefi is fluent in it.

A standard glossary for technical calculations

This is the bigger ambition.

Technical analysis has a vocabulary problem. Terms everyone uses (“hammer”, “oversold”, “divergence”, “squeeze”) quietly mean different things in different tools. Two traders can run the “same” screen and get different lists without either of them being wrong.

We want sortefi-ta to become a reference glossary: one place where each calculation and pattern has a written, readable, versioned definition anyone can check. If you think our hammer rule is wrong, you can now see exactly what it is, open an issue and make your case in public. If the community agrees, the definition improves for everyone.

That's something a closed tool can never offer.

What's next

  • The code is on GitHub and the package is on PyPI.
  • New to it? The docs page gets you from install to your first screen in a few lines.
  • Issues, corrections and suggested definitions are welcome.
  • Improvements we make to the calculations inside Sortefi will flow back into the library.

And if you'd rather not write code at all, that's what Sortefi is for. Describe the screen in plain English and get the symbols back.

— Siddharth, founder of Sortefi