safepine_os.backtest.algorithms

Copyright (C) 2026 Safepine LLC

This file is part of Safepine OS.

Safepine OS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Safepine OS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Safepine OS. If not, see <https://www.gnu.org/licenses/>.

Members

Functions

BuyAndHold
void BuyAndHold(Engine engine_IN, double initial_deposit_IN, Date start_date_IN, Date end_date_IN, string[] asset_names_IN, Matrix asset_ratios_IN)
Discretionary
void Discretionary(Engine engine_IN, double initial_deposit_IN, Date start_date_IN, Date end_date_IN, string[][] asset_names_IN, Matrix[] asset_ratios_IN, Date[] asset_dates_IN, string scheduleType_IN)
Pine
PineScoreSnapshot[] Pine(Engine engine_IN, double initial_deposit_IN, Date start_date_IN, Date end_date_IN, string[] asset_names_IN, PINEParams pine_params_IN, int rebalance_day_IN)
RankedPine
PineScoreSnapshot[] RankedPine(Engine engine_IN, double initial_deposit_IN, Date start_date_IN, Date end_date_IN, string risk_free_symbol_IN, string[] universe_symbols_IN, PINEParams pine_params_IN, int top_n_assets_IN, int rebalance_day_IN)
Rebalance
void Rebalance(Engine engine_IN, double initial_deposit_IN, Date start_date_IN, Date end_date_IN, string[] asset_names_IN, Matrix asset_ratios_IN, int rebalance_day_IN)

Structs

PineScoreSnapshot
struct PineScoreSnapshot