Research (fynance.research)

A data-agnostic harness for running strategy experiments and emitting portable result artifacts. fynance never stores results itself — artifacts are written to a caller-provided output_dir. Built and tested on synthetic data; real-data adapters live downstream.

Experiment(name[, spec, code, seed, ...])

Serializable record of a single strategy experiment.

Ledger(root)

A persistent, append-only store of experiments under root.

run_experiment(strategy, data, *, name[, X, ...])

Run a strategy experiment and return a populated Experiment.

write_report(experiment, output_dir, *[, ...])

Write a portable report for experiment under output_dir.

compare_report(experiments, output_dir, *[, ...])

Write a leaderboard + equity-overlay comparison report.

leaderboard(experiments, *[, sort_by, ...])

Rank experiments into leaderboard rows.

permutation_test(strategy, data, *[, ...])

Permutation test for a spurious edge.

probabilistic_sharpe_ratio(sr, n_obs, *[, ...])

Probabilistic Sharpe ratio (PSR).

deflated_sharpe_ratio(sr, n_obs, n_trials, *)

Deflated Sharpe ratio (DSR).

resample_paths(returns, *[, n_paths, block, ...])

Block-bootstrap resampled paths of a (possibly autocorrelated) series.

bootstrap_metric(returns, metric, *[, ...])

Block-bootstrap percentile confidence interval for an arbitrary metric.

block_permutation_test(strategy_returns, *)

Dependence-preserving analogue of permutation_test.

ImportanceResult(importances, stds, ...[, ...])

Result of walk_forward_mda.

walk_forward_mda(model_factory, X, y, *[, ...])

Mean-decrease-accuracy feature importance, evaluated out-of-fold.

PBOResult(pbo, logits, prob_oos_loss, slope, ...)

Result of a pbo run.

pbo(returns_panel[, n_blocks, metric])

Probability of backtest overfitting via combinatorially symmetric CV.

returns_panel(experiments)

Build a (T, n_configs) returns panel from research experiments.

gbm(n, *[, mu, sigma, s0, seed])

Geometric Brownian motion price path.

regime_switching(n, *[, regimes, p_switch, ...])

Markov regime-switching price path.