← Back to all apps

LONA Trading Assistant

Financeby Mindsight Ventures SL
Launched Mar 11, 2026 on ChatGPT

LONA Trading Assistant helps you develop, backtest, and optimize algorithmic trading strategies using AI. Upload market data from supported exchanges, write Python-based trading strategies, and run comprehensive backtests to see how your strategies would have performed historically. View detailed performance reports with interactive charts showing entry/exit points, returns, and risk metrics.

19ChatGPT Tools
Mindsight Ventures SLDeveloper
FinanceCategory

Available Tools

Lona Create Strategy

lona_create_strategy
Full Description

Creates a new trading strategy from existing Backtrader Python code.

Code requirements:

  • The code imports backtrader: import backtrader as bt
  • Defines a class inheriting from bt.Strategy
  • Parameters use tuple format: params = (('name', value), ...)
  • Indicators are initialized in __init__, trading logic in next()

Example:

import backtrader as bt

class Strategy(bt.Strategy):
    params = (('period', 20),)

    def __init__(self):
        self.sma = bt.indicators.SMA(period=self.p.period)

    def next(self):
        if self.data.close[0] > self.sma[0]:
            self.buy()
Parameters (2 required, 2 optional)
Required
codestring

Python Backtrader strategy code (must inherit from bt.Strategy)

namestring

Name of the strategy

Optional
descriptionstring

Description of what the strategy does

versionstring

Version string (e.g., "1.0.0")

Lona Create Strategy From Description

lona_create_strategy_from_description
Full Description

Creates a new trading strategy from a natural language description. An AI pipeline generates Backtrader Python code based on the description.

This is an asynchronous operation. Returns a jobId immediately. The generation runs in the background (typically 3-5 minutes). Progress can be checked with lona_get_strategy_creation_status.

Pipeline stages: PENDING -> GENERATING -> SAVING -> COMPLETED (or FAILED at any point).

Example descriptions:

  • "A momentum strategy that buys when RSI crosses above 30 and sells below 70"
  • "Trend following using 20 and 50 period moving averages with 2% stop loss"
  • "Mean reversion with Bollinger Bands - buy at lower band, sell at upper band"
Parameters (1 required, 3 optional)
Required
descriptionstring

Natural language description of the trading strategy you want to create

Optional
modelstring

Specific model to use (provider-specific)

namestring

Optional name for the strategy. If not provided, a name will be auto-generated based on the description.

providerstring

AI provider to use. If omitted, the server uses its configured default. Use "openrouter" for access to 300+ models.

Options:xaiopenaianthropicgoogleopenrouter

Lona Download Market Data

lona_download_market_data
Full Description

Downloads cryptocurrency market data from supported exchanges and saves it as a new symbol in the user's Lona account. Returns a symbol ID usable as a data_id in lona_run_backtest.

Supported intervals: 1m, 5m, 15m, 30m, 1h, 4h, 1d

Practical data limits:

  • 1m data: up to ~6 months
  • 5m data: up to ~2 years
  • 1h+ data: several years of history
Parameters (4 required, 1 optional)
Required
end_datestring

End date in YYYY-MM-DD format (e.g., 2024-12-31)

intervalstring

Candle interval/timeframe

Options:1m5m15m30m1h4h1d
start_datestring

Start date in YYYY-MM-DD format (e.g., 2024-01-01)

symbolstring

Trading pair (e.g., BTCUSDT, ETHUSDT, BNBUSDT). Must be a valid spot trading pair.

Optional
namestring

Optional custom name for the symbol. If not provided, auto-generates name like "BTCUSDT-1h-2024-01-01-to-2024-12-31"

Lona Get Full Report

lona_get_full_report
Full Description

Retrieves comprehensive backtest results by ID, including detailed metrics, trade history, and per-symbol performance breakdown.

Parameters (1 required)
Required
idstring

The report ID to retrieve in full

Lona Get Report

lona_get_report
Full Description

Retrieves a backtest report summary by ID. Returns key performance metrics including total return, Sharpe ratio, maximum drawdown, win rate, and number of trades.

Parameters (1 required)
Required
idstring

The report ID to retrieve

Lona Get Report Chart

lona_get_report_chart
Full Description

Retrieves chart data for a completed backtest report. Returns an interactive candlestick chart with buy/sell markers showing trade entry and exit points.

Parameters (1 required)
Required
idstring

The report ID to visualize

Lona Get Report Status

lona_get_report_status
Full Description

Checks the execution status of a backtest report. Returns current status (PENDING, EXECUTING, PROCESSING, COMPLETED, or FAILED) and whether the backtest is complete.

Parameters (1 required)
Required
idstring

The report ID to check status for

Lona Get Strategy

lona_get_strategy
Full Description

Retrieves metadata for a single trading strategy by ID. Returns the strategy name, description, version, language, and timestamps.

Parameters (1 required)
Required
idstring

The strategy ID to retrieve

Lona Get Strategy Code

lona_get_strategy_code
Full Description

Retrieves the Python source code of a trading strategy by ID. Returns the Backtrader code that implements the strategy logic.

Parameters (1 required)
Required
idstring

The strategy ID to get code for

Lona Get Strategy Creation Status

lona_get_strategy_creation_status
Full Description

Checks the progress of an async strategy creation job started by lona_create_strategy_from_description.

Returns current status: PENDING, GENERATING, SAVING, COMPLETED, or FAILED. When COMPLETED, includes the strategyId, generated code, explanation, and a review score. When FAILED, includes error details and suggestions.

Parameters (1 required)
Required
jobIdstring

The job ID returned by lona_create_strategy_from_description

Lona Get Symbol

lona_get_symbol
Full Description

Retrieves metadata for a single market data symbol by ID. Returns the symbol name, description, data type, and whether it is a global or user-uploaded dataset. The metadata field may include exchange, asset_class, frequency, quote_currency, and timeframe availability.

Parameters (1 required)
Required
idstring

The symbol ID to retrieve

Lona Get Symbol Data

lona_get_symbol_data
Full Description

Retrieves OHLCV (Open, High, Low, Close, Volume) time-series price data for a symbol by ID.

Parameters (1 required)
Required
idstring

The symbol ID to get data for

Lona List Reports

lona_list_reports
Full Description

Lists the user's backtest reports with status, performance metrics (return, Sharpe ratio, trades), and timestamps. Supports filtering by strategy_id or status (PENDING, EXECUTING, PROCESSING, COMPLETED, FAILED) and pagination via skip/limit.

Parameters (0 required, 4 optional)
Optional
limitnumber

Maximum number of reports to return (default: 20, max: 50)

skipnumber

Number of reports to skip (for pagination)

statusstring

Filter reports by status

Options:PENDINGEXECUTINGPROCESSINGCOMPLETEDFAILED
strategy_idstring

Filter reports by strategy ID

Lona List Strategies

lona_list_strategies
Full Description

Lists the user's saved trading strategies. Returns strategy names, IDs, descriptions, and version info. Supports pagination via skip/limit parameters.

Parameters (0 required, 2 optional)
Optional
limitnumber

Maximum number of strategies to return (default: 20, max: 50)

skipnumber

Number of strategies to skip (for pagination)

Lona List Symbols

lona_list_symbols
Full Description

Lists available market data symbols. Returns user-uploaded data files by default, or pre-loaded global datasets (US equities, crypto, forex) when is_global=true. Each symbol has an ID usable as a data_id in lona_run_backtest.

Parameters (0 required, 4 optional)
Optional
is_globalboolean

If true, returns pre-loaded global symbols. If false or omitted, returns user-uploaded symbols (default behavior).

isGlobalboolean

If true, returns pre-loaded global symbols. If false or omitted, returns user-uploaded symbols (default behavior).

limitnumber

Maximum number of symbols to return (default: 20, max: 50)

skipnumber

Number of symbols to skip (for pagination)

Lona Register Agent

lona_register_agent
Full Description

Provisions a session token for API-key mode authentication. Not needed for OAuth-authenticated sessions (e.g., ChatGPT users). Returns a short-lived token for subsequent tool calls.

Parameters (1 required, 6 optional)
Required
agent_idstring

Unique agent identifier (becomes partner_id)

Optional
agent_namestring

Human-readable agent name

agent_user_idstring

User ID for Lona requests (defaults to agent_id)

expires_in_daysnumber

Optional token TTL override (days)

metadataobject

Optional metadata stored with the token

permissionsarray

Optional permission list

sourcestring

Registration source (e.g., moltbook)

Lona Run Backtest

lona_run_backtest
Full Description

Executes a trading strategy backtest against historical market data. Runs asynchronously and returns a report_id for checking progress with lona_get_report_status.

Required inputs:

  • strategy_id: a Lona strategy ID (from lona_list_strategies, lona_create_strategy, or lona_create_strategy_from_description)
  • data_ids: array of Lona symbol IDs (from lona_list_symbols, lona_download_market_data, or lona_upload_market_data)

Configurable parameters:

  • initial_cash: Starting capital (default: 100000)
  • commission: Trading commission as decimal (default: 0.001 = 0.1%)
  • leverage: Maximum leverage allowed (default: 1)
  • parameters: Override strategy parameters (passed to the strategy's params tuple)
Parameters (4 required, 5 optional)
Required
data_idsarray

Array of Lona symbol IDs (returned by lona_list_symbols, lona_download_market_data, or lona_upload_market_data)

end_datestring

End date for backtest (ISO format: YYYY-MM-DD)

start_datestring

Start date for backtest (ISO format: YYYY-MM-DD)

strategy_idstring

Lona strategy ID (returned by lona_list_strategies, lona_create_strategy, or lona_create_strategy_from_description)

Optional
buy_on_closeboolean

Execute buy orders at close price (default: true)

commissionnumber

Commission rate as decimal (default: 0.001)

initial_cashnumber

Initial cash for simulation (default: 100000)

leveragenumber

Maximum leverage (default: 1)

parametersarray

Strategy parameters to override defaults

Lona Update Strategy

lona_update_strategy
Full Description

Modifies an existing trading strategy. Accepts updates to the name, description, or code individually or all at once.

This operation uses immutable versioning: the update creates a new version of the strategy and returns a new strategy ID. The previous version is replaced in listings. The returned strategyId represents the latest version.

Parameters (1 required, 3 optional)
Required
idstring

The strategy ID to update (the current version)

Optional
codestring

New Python Backtrader code

descriptionstring

New description for the strategy

namestring

New name for the strategy

Lona Upload Market Data

lona_upload_market_data
Full Description

Uploads user-provided CSV market data and creates a new symbol in the user's Lona account. Returns a symbol_id usable as a data_id in lona_run_backtest.

Accepts data via the file parameter (when user attaches a CSV) or the csv_content parameter (raw CSV string).

This tool accepts OHLCV (Open-High-Low-Close-Volume) price data in CSV format.

CSV Requirements:

  • Header row with column names
  • Minimum 10 data rows
  • Maximum ~15MB
  • Must contain at minimum: a timestamp/date column and a close price column
  • Additional columns (open, high, low, volume) are optional but recommended

Supported timestamp formats (auto-detected):

  • ISO 8601: 2024-01-15T00:00:00Z
  • Date-time: 2024-01-15 00:00:00
  • Date only: 2024-01-15
  • Slash format: 01/15/2024 or 15/01/2024 (auto-detected)
  • Unix timestamps: 1705276800 (seconds), 1705276800000 (ms)

Standard column names (auto-detected, case-insensitive):

  • Timestamp: "timestamp", "date", "time", "datetime"
  • Price: "open", "high", "low", "close" (or "adj close", "price")
  • Volume: "volume", "vol"

If your CSV uses non-standard column names, provide the column_mapping parameter.

Parameters (1 required, 9 optional)
Required
namestring

Name for this data symbol (e.g., "AAPL Daily 2024" or "My Custom Data")

Optional
asset_classstring

Asset class (e.g., "equity", "crypto", "forex"). Defaults to "other".

column_mappingobject

Custom column mapping if your CSV uses non-standard column names. If not provided, columns are auto-detected.

csv_contentstring

Raw CSV content as a string (alternative to the file parameter for pasted data).

descriptionstring

Optional description of the dataset.

exchangestring

Exchange name (e.g., "NYSE", "BINANCE"). Defaults to "CUSTOM".

fileobject

File uploaded by the user (automatically provided when user attaches a file)

frequencystring

Data frequency/timeframe. Defaults to "1d".

Options:1m5m15m30m1h4h1d1w1M
quote_currencystring

Quote currency. Defaults to "USD".

Options:USDEURGBPJPYAUDCADCHFCNYSEKNZDMXNINRBRLZARRUBKRWTRYARS
timezonestring

Data timezone (e.g., "UTC", "US/Eastern"). Defaults to "UTC".