The biggest problem with trading is knowing exactly to enter a trade. Many methods/strategies/indicators exist to assist traders, applying various methods and formulas, from different branches present within STEM. In this article, I will be showing you briefly how to use the Lorenz Formula to assist with your BTC trading.
Why the Lorenz System Equations? The biggest reason why I chose the Lorenz System was because of the interesting concept surrounding these equations. This system is considered chaotic, something that stock/crypto price behavior most definitely is, because of how easy the system’s solutions changes due to a change in the initial conditions.
For a quick tutorial on how to prepare the Lorenz Equations in Python, please refer to my previous tutorial, linked below:
Utilizing the Lorenz Equations with Bitcoin’s financial data
The Lorenz equations use 3 initial conditions, that depending on their value, can change the whole outcome of the solution and they are: rho, sigma, and beta. After months and years of testing, the initial conditions that have given the best results have looked like this:

Rho within the 100–1000's range. Sigma within the 1–10 range. Beta within the .01 — .90 range. From where or how we get these values, that would be a trade secret. This information is grabbed from Binance.US, mostly just BTC info (volumes, trades, pricing, etc.), and transformed to ensure that it stays within those ranges.
Once we have these initial conditions set (don’t worry, they are not permanent, they will be changing each time the code updates the price/volume/info, every 5 minutes for my code), now we have to capture what the equations output. If you notice from the previous article, the outputs are stored in arrays that we have called x, y, and z.
Each time a, for example, y array is generated (which happens with each update, don’t forget), we are greeted with a graph that looks like this:

Press enter or click to view image in full size
Every 5 minutes (the rate at which my code updates), we will be generating this graph, so how do we take advantage of this information? Well, that’s another trade secret, however, after grabbing certain parts of this graph and doing some secret math, we can finally have a y value that we can use to make a determination. Here is a graph that shows all the newly generated y values that have been created and used for our entry conditions:
Press enter or click to view image in full size

However, we have 3 variable that we can use, which one is the best one? That is for one to decide! For me? I decided to use the z variable. By using the z output, we go from this graph:
Press enter or click to view image in full size

And after using the Lyapunov Exponent, well, a secret touched-up version of it. We are able to finally have z values that look like this:
Press enter or click to view image in full size

And this! This is the secret formula! These z values are the ones that do all the magic. Once we have these values, we then run an if condition to tell our code that it’s finally time to buy. And as before, the reasoning behind the if statements are secrets, secrets, secrets.
Results So now that we finally have all our ingredients, this is how the code performs:
Press enter or click to view image in full size

Between July 14 and July 16, this was the signal the code gave. They may seem a bit small but their intentions are huge! Before the bull run, we have wonderful buy signals. Right before bear run, we have some few risky buy signals, with some that landed right in the middle of the fall but this code was able to capture the absolute dip! The signals in the middle of the fall are not too much of a bother because I have a simple safeguard in place for situations like those.
And how about during the most recent bear run? Between July 31st and August 2nd, we had a crazy drop. This code does get influenced by how active the market is, so more trades going on means we have crazier z values and thus, a less efficient code. As shown below:
Press enter or click to view image in full size

During this time, the code sent 18 buy signals. I’d consider 4 of those to be difficult to manage. Every other buy signal has a moment, no matter how small, that can lead to profits later. But these 4, they technically do not have that profit moment. However, that’s where safeguards come into place, so I do not worry when it comes to my account, but for someone else, they might want to stay away.
Final Thoughts Personally, I have very satisfied with this code. Of course, it’s my own creation but after years of testing, the code went live at the end of May 2025. Since then, the code has done ~350 buy/sell transactions and this is the profit until now:
Press enter or click to view image in full size

Which I must say! Almost 3% in 2.5 months is a great number, that’s almost 1% per month of profits. Which quickly translates to 10% a year! 10% passive income a year is okay in my books. Now if I only had 1 million dollars laying around.
Programming language used: Python with Jupyter Notebooks
Crypto Trading Platform used: Binance.US
Trading Pairs used: BTC/USDC (commission free buy/sell on Binance.US)