Upload Strategy Code

Upload, validate, and version your strategy source code

Upload a Python strategy, validate it against the Investing Algorithm Framework (IAF), and register an immutable version in Finterion.

This quickstart uses a manual folder or ZIP upload. You can also push from the CLI or connect a GitHub repository when you want an automated workflow.

Prerequisites

Before you begin, make sure you have:

  • A Finterion developer account and organization.
  • An algorithm created in the Developer Dashboard.
  • A Python strategy built with IAF.
  • An app.py entry point that exposes either app: Algorithm or create_app().

Tip: Starting from scratch? Install the CLI and run finterion init my-strategy to scaffold an IAF project with the expected structure.

1. Prepare your project

Framework

Keep the entry point and dependency file at the root of the folder you upload. A typical project looks like this:

Text

my-strategy/
├── app.py
├── requirements.txt
├── strategy/
│   ├── __init__.py
│   └── momentum.py
└── tests/
    └── test_strategy.py

Finterion accepts a project folder or a .zip archive. Include all local Python modules imported by your entry point. Dependencies can be declared in requirements.txt or pyproject.toml.

Configure app.py

Your app.py should create the IAF application, register your strategy, and configure its market. Read configurable values from the FINTERION_PARAM_* environment variables so Finterion can inject the parameters bound to a preset during validation and backtesting.

Python

import json
import os

from investing_algorithm_framework import create_app
from . import SupertrendEmaConfirmationStrategy

app = create_app()

# target_symbols ("universe") is a JSON-encoded list — parse it, falling
# back to a sane default for a param-agnostic (tier-1) validation run,
# where no preset is bound and these env vars are unset.
target_symbols = json.loads(os.environ.get("FINTERION_PARAM_TARGET_SYMBOLS", '["BTC"]'))

app.add_strategy(SupertrendEmaConfirmationStrategy(
    algorithm_id="supertrend-ema-confirmation",
    symbols=target_symbols,
    trading_symbol=os.environ.get("FINTERION_PARAM_TRADING_SYMBOL", "EUR"),
    rsi_timeframe="1h",
    rsi_period=int(os.environ.get("FINTERION_PARAM_RSI_PERIOD", "14")),
    rsi_overbought_threshold=int(os.environ.get("FINTERION_PARAM_RSI_OVERBOUGHT_THRESHOLD", "70")),
    rsi_oversold_threshold=int(os.environ.get("FINTERION_PARAM_RSI_OVERSOLD_THRESHOLD", "30")),
    ema_timeframe="4h",
    ema_short_period=int(os.environ.get("FINTERION_PARAM_EMA_SHORT_PERIOD", "12")),
    ema_long_period=int(os.environ.get("FINTERION_PARAM_EMA_LONG_PERIOD", "26")),
    ema_cross_lookback_window=int(os.environ.get("FINTERION_PARAM_EMA_CROSS_LOOKBACK_WINDOW", "3")),
))

# Override the whole "universe" (which market/exchange + quote currency
# to trade against) from the bound preset too — same env vars as above.
app.add_market(
    market=os.environ.get("FINTERION_PARAM_MARKET", "bitvavo"),
    trading_symbol=os.environ.get("FINTERION_PARAM_TRADING_SYMBOL", "EUR"),
    initial_balance=400,
)

if __name__ == "__main__":
    app.run()

This example expects SupertrendEmaConfirmationStrategy to be exported by the uploaded package's __init__.py. If your strategy class lives in another module, update the import to match your project structure.

Before uploading, remove files your strategy does not need, such as virtual environments, local datasets, credentials, and build output.

Never upload secrets. Keep API keys, exchange credentials, private keys, and .env files outside the archive. Configure credentials through Finterion connections instead.

2. Open the Upload page

In Finterion:

  1. Open the Developer Dashboard.
  2. Select Algorithms, then open your algorithm.
  3. Select the Upload tab.
  4. Choose Manual upload as the source.

The Upload page also shows recent imports and their validation status, so you can diagnose a failed upload without leaving the page.

3. Upload your code

Drag the project folder or ZIP archive into the upload area. You can also use Choose folder or Choose zip.

Optionally, enter a version label such as v1.2.0. If you leave it empty, Finterion generates one for you.

Review the selected files, then start the upload. Finterion preserves folder-relative paths when it reconstructs your project.

4. Wait for validation

Every upload runs through the same IAF import pipeline. Finterion inspects the project, resolves the entry point and strategy class, installs declared dependencies, and validates the strategy before registering a version.

When validation succeeds, the Upload page displays:

  • Upload validated and the completed import status.
  • A newly registered, immutable strategy version.
  • The source manifest and detected strategy metadata.

If validation fails, expand the import in Recent imports. The failed step, diagnostic summary, and terminal output identify what to fix before uploading again.

Common issue: If Finterion cannot find your strategy, confirm that app.py is in the uploaded project root and exposes app: Algorithm or create_app().

Upload from the CLI

Use the CLI when you want to validate and push without leaving your editor:

Shell

pip install finterion-cli
finterion login

cd my-strategy
finterion validate
finterion push

finterion validate runs the import checks locally. finterion push uploads the current project and registers a new version after server-side validation succeeds.

Connect a GitHub repository

For repeat uploads, choose Git on the Upload page and connect the Finterion GitHub App or authorize a repository through OAuth. Then select:

  • The repository and branch or tag.
  • An optional commit to pin.
  • The project subpath for a monorepo.
  • The entry point and Python version.

GitHub App connections can enable automatic imports when new commits are pushed. OAuth connections support one-click imports but do not register webhooks for automatic imports.

Next steps

  • Open the algorithm's Versions tab to inspect the registered source version and extracted parameters.
  • Run finterion run vector --period 2y to start a vectorized backtest from the CLI.
  • Upload the resulting research bundle with Uploading Backtests (CLI).