Skip to main content
forecast_path analyses the causal structure of a time series to identify two structural states:
  • Initiation: Signals the emergence of a new causal trajectory, showing the start of a new causal chain.
  • Persistence: Validates the continuation of an established trajectory, indicating the current causal chain is still evolving.

Function Parameters

ParameterTypeDefaultRequiredDescription
timeframe_dependentboolFalseFalseDetermines the indexing method. If True, a datetime column is expected. If False, a sequential step-based index is required.
time_series_typestringNoneTrueTime series data type, e.g. ‘ohlc’, ‘univariate’, or ‘rmsf’.
data_inputobjectNoneTrueThe financial time series data to be analysed. Can be a file path (CSV, Parquet, etc.) or a pandas DataFrame.
reasoning_modestringNoneTrueThe strategy used for decisions: ‘proactive’ acts early; ‘reactive’ waits for sufficient evidence.
intervalintNoneFalseThe frequency of the time series data. Use in conjunction with interval_unit.
interval_unitstringNoneFalseThe unit of time for the interval (e.g. ‘seconds’, ‘minutes’, ‘days’).
rmsf_stabilityintNoneFalseThe maximum cumulative or averaged stability index permitted for the system.
rolling_pathboolFalseFalseGenerates a rolling path forecast across input based on rolling_path_window_size.
rolling_path_window_sizeint5001FalseWindow size of rolling window, e.g. 5001 data periods.
rolling_path_file_outputstringNoneFalseThe base name for the output file (e.g. ‘saved_output’ creates ‘saved_output.csv’).

Configuration Options

A. Time Series Type
OptionDescription
ohlcA series of multivariate data points recorded over time containing open, high, low, close values e.g. financial time series.
univariateA series of data points recorded over time for a single variable e.g. temperature time series.
rmsfA series of Root Mean Square Fluctuation values points recorded over time commonly used in molecular modelling e.g. protein trajectories.
Timeframe Dependency
OptionDescription
TrueAnchors the state-space reconstruction to specific temporal units. The manifold is mapped against linear time.
FalseTreats data as an ordered sequence of morphisms. The CIL maps the system’s state-space based on event-flow rather than clock-intervals.

Interpreting Function Response

The function returns a dictionary containing the target timestamp/index and the detected causal state: {"target_anchor": signal}.
ResponseTypeDescription
1intPositive causal chain detected.
0intNo chain detected, indicates a multi-frequency overlap where opposing directional changes are occurring simultaneously on different timescales.
-1intNegative causal chain detected.

Python Examples

A. Timeframe Dependent (Temporal Mapping)
Use this configuration to map the system’s state-space to specific clock-intervals (milliseocnds, seconds, minutes, days).
The forecast_path function requires a specific data length to establish causal context. To forecast the next state, you must append a final “placeholder” row (in this example: 2025-08-19 17:00:00).
datetimeopenhighlowclose
2025-01-23 09:00:00100.20110.5090.1095.30
2025-01-23 10:00:0095.3098.1086.4088.20
[… 4,998 rows]
2025-08-19 17:00:000000
N=5001 Requirement: The algorithm utilises 5,000 preceding periods to reconstruct the system’s state-space. You must include a 5001st row that acts as a ‘placeholder’.
import sumtyme

# Initialise the client
client = sumtyme.client(apikey='your-api-key-here')

# Execute the forecast
# The CIL distinguishes between the initiation of a new chain and the persistence of an existing one.
forecast = client.forecast_path(
    time_series_type = 'ohlc',
    data_input='data/ohlc_price_5001.csv', 
    interval = 1,
    interval_unit = 'minutes',
    reasoning_mode='reactive',
    timeframe_dependent=True
)

print(forecast)
# Output: {"2025-08-19 17:00:00": -1}
The forecast_path function requires a specific data length to establish causal context. To forecast the next state, you must append a final “placeholder” row (in this example: 2025-08-19 17:00:00).
datetimevalue
2025-01-23 09:00:00100
2025-01-23 10:00:0095
[… 4,998 rows]
2025-08-19 17:00:000
N=5001 Requirement: The algorithm utilises 5,000 preceding periods to reconstruct the system’s state-space. You must include a 5001st row that acts as a ‘placeholder’.
import sumtyme

# Initialise the client
client = sumtyme.client(apikey='your-api-key-here')

# Execute the forecast
# The CIL distinguishes between the initiation of a new chain and the persistence of an existing one.
forecast = client.forecast_path(
    time_series_type = 'univariate',
    data_input='data/univariate_5001.csv', 
    interval = 1,
    interval_unit = 'seconds',
    reasoning_mode='reactive',
    timeframe_dependent=True
)

print(forecast)
# Output: {"2025-08-19 17:00:00": -1}
B. Timeframe Independent (Event-Flow Mapping)
Use this configuration to map the system’s state-space based on sequential event-flow rather than linear time.
The forecast_path function requires a specific data length to establish causal context. To forecast the next state, you must append a final “placeholder” row (in this example: 5001).
stepopenhighlowclose
11001109095
295988688
[… 4,998 rows]
50010000
N=5001 Requirement: The algorithm utilises 5,000 preceding periods to reconstruct the system’s state-space. You must include a 5001st row that acts as a ‘placeholder’.
import sumtyme

# Initialise the client
client = sumtyme.client(apikey='your-api-key-here')

# Execute the forecast
# The CIL distinguishes between the initiation of a new chain and the persistence of an existing one.
forecast = client.forecast_path(
    time_series_type = 'ohlc',
    data_input='data/ohlc_price_5001.csv', 
    reasoning_mode='reactive',
    timeframe_dependent=False
)

print(forecast)
# Output: {"5001": -1}
The forecast_path function requires a specific data length to establish causal context. To forecast the next state, you must append a final “placeholder” row (in this example: 5001).
stepvalue
1100
295
[… 4,998 rows]
50010
N=5001 Requirement: The algorithm utilises 5,000 preceding periods to reconstruct the system’s state-space. You must include a 5001st row that acts as a ‘placeholder’.
import sumtyme

# Initialise the client
client = sumtyme.client(apikey='your-api-key-here')

# Execute the forecast
# The CIL distinguishes between the initiation of a new chain and the persistence of an existing one.
forecast = client.forecast_path(
    time_series_type = 'univariate',
    data_input='data/univariate_5001.csv', 
    interval = 1,
    interval_unit = 'seconds',
    reasoning_mode='reactive',
    timeframe_dependent=False
)

print(forecast)
# Output: {"5001": -1}
The forecast_path function requires a specific data length to establish causal context. To forecast the next state, you must append a final “placeholder” row (in this example: 5001).
steprmsf
1100
295
[… 4,998 rows]
50010
N=5001 Requirement: The algorithm utilises 5,000 preceding periods to reconstruct the system’s state-space. You must include a 5001st row that acts as a ‘placeholder’.
import sumtyme

# Initialise the client
client = sumtyme.client(apikey='your-api-key-here')

# Execute the forecast
# The CIL distinguishes between the initiation of a new chain and the persistence of an existing one.
forecast = client.forecast_path(
    time_series_type = 'univariate',
    data_input='data/univariate_5001.csv', 
    interval = 1,
    interval_unit = 'seconds',
    reasoning_mode='reactive',
    timeframe_dependent=False
)

print(forecast)
# Output: {"5001": -1}

C. Automated Rolling Forecast
import sumtyme

# Initialise the sumtyme client with the provided API key from your dashboard
client = sumtyme.client(apikey='your-api-key-here')

# Execute a rolling forecast across an entire dataset
# The function automatically manages the FIFO window to map the system's evolution
client.forecast_path(
    time_series_type='ohlc',
    data_input='folder/full_data.csv',        # Supports file paths or pandas DataFrames
    reasoning_mode='reactive',
    rolling_path=True,                        # Enables iterative processing across the dataset
    rolling_path_window_size=5001,            # Defines the causal context window (N=5001)
    rolling_path_file_output='rolling_path'   # Saves results to 'rolling_path.csv'
)

"""
Automatically saves each time step's rolling path forecast, appending the results to a single .csv file (e.g. './rolling_api_outputs.csv').
"""