Here at Black Box Labs, we believe the most powerful signals often come from the most unexpected places. While most traders are fixated on charts and economic headlines, the quant has been looking up – WAY UP – to the cosmos for inspiration.

We’re pioneering a new frontier in algorithmic trading by modelling the foreign exchange market as a complex gravitational system. In this post, we’ll pull back the curtain on one of the core components of our proprietary system: using the physics of celestial mechanics to gauge the momentum and “pull” of currency pairs.

The Cosmic Blueprint: Currencies in Orbit

At the heart of our model are three key concepts from astrophysics:

  1. The Barycenter: This is the common centre of mass around which two celestial bodies orbit. In our FX universe, a currency pair (e.g., EUR/USD) is treated as a two-body system. The stronger currency doesn’t just “win”; both exert influence on each other, and their interaction creates a dynamic equilibrium point – the barycenter. The price action orbits this point.
  2. Eccentricity: This measures how circular or elliptical an orbit is. High eccentricity means a more stretched, volatile orbit. We use this to quantify market volatility. A period of high eccentricity suggests a system under stress, potentially preceding a significant breakout or reversion.
  3. Angular Momentum: In physics, this is a measure of the amount of rotation an object has, considering its mass, velocity, and distance from the center. Translating this to finance, it helps us quantify the strength and sustainability of a trend.

The challenge is calculating these values accurately from noisy, real-world market data. This is where signal processing meets astrophysics.

Cleaning the Signal: Fast Fourier Transform

To calculate orbital elements like eccentricity, we first need to transform our price time series from the time domain into the frequency domain. We need to see the dominant cyclical components (the “harmonics”) of the price movement.

We do this using a Fast Fourier Transform (FFT). However, a raw FFT on financial data suffers from a problem called spectral leakage – where energy from one frequency bleeds into others, creating a smeared and inaccurate frequency spectrum.

This is unacceptable for precision modelling.

Our solution is to apply a mathematical function to the data before performing the FFT. This tapers the ends of the data series to near zero, drastically reducing spectral leakage and providing a cleaner, more isolated view of the market’s true cyclical components. This precise spectral analysis allows us to calculate far more accurate values for eccentricity and momentum.

The “Economic Mass” of a Currency

Here’s where we make our model dynamic. In space, mass is a fixed property. In economics, it’s not. A currency’s “mass” – its influence and gravitational pull – is determined by its underlying interest rates.

Here’s our process for dynamically calculating a currency’s mass:

  1. Data Feed: We pull live central bank interest rates (e.g., ECB for EUR, Fed for USD) via Bloomberg or Reuters APIs.
  2. Calculate the Differential: For the pair we are trading (e.g., EUR/USD), we calculate the rate differential in basis points.
# Example for EURUSD
base_rate = get_rate('ECB')  # e.g., 4.25%
quote_rate = get_rate('FED') # e.g., 5.50%

rate_diff_bps = (base_rate - quote_rate) * 100  # (4.25 - 5.50) * 100 = -125 bps

3. Dynamic Mass Calculation: We use this differential to adjust a base, mass value for the currency.

base_eur_mass = 1.0  # base mass
dynamic_eur_mass = base_eur_mass * (1 + (rate_diff_bps * 0.01))

# Calculation: 1.0 * (1 + (-125 * 0.01)) = 1.0 * (1 - 1.25) = -0.25
  • Interpretation: A negative differential (EUR < USD) results in a negative mass adjustment for the EUR. In our gravitational model, this weakens the EUR’s “pull” in the system, making downward momentum (a stronger USD) more probable and potent.
  • Conversely, a positive differential increases the base currency’s mass, strengthening its gravitational influence and favoring long signals.

This dynamic_eur_mass value becomes a direct input into our equations for calculating the barycenter and angular momentum of the EUR/USD system. The economic fundamental isn’t used as a standalone signal; it’s woven into the very fabric of our physical model.

Synthesizing the Signal

By combining the precision of processed FFT with the dynamic “Economic Mass” derived from live interest rates, we can continuously compute:

  • The shifting barycenter of the pair.
  • The orbital eccentricity (volatility).
  • The system’s angular momentum (trend strength).

Trading signals are generated when these physical calculations reach extreme values or when our model predicts a shift in the equilibrium based on the changing gravitational forces.

This fusion of celestial mechanics, advanced signal processing, and real-time economic data is a testament to our philosophy at Black Box Labs: true edge lies in interdisciplinary innovation. By treating the market not as a mere chart but as a complex physical system, we aim to anticipate its movements with a unique and powerful perspective.

The cosmos is governed by the elegant laws of physics. While the market will never be that predictable, we believe borrowing from that elegance provides a compelling lens through which to view the chaos.


Leave a Reply

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