pflab_* tool: it builds portfolios as estimator pipelines and validates them out of sample. Mean-risk optimisation over 15 risk measures on any prior (sample or shrunk moments, Black-Litterman, entropy pooling, opinion pooling, factor models, vine-copula scenarios), efficient frontiers, risk budgeting, maximum diversification, distributionally robust CVaR, benchmark tracking, HRP, HERC, Schur and nested-cluster portfolios and stacking; walk-forward, combinatorial purged and online cross-validation with hyper-parameter search; 13 covariance estimators with forecast evaluation; return distributions, copulas and synthetic stress tests; analytics over 46 return, risk and ratio measures; and characteristics-based cross-sectional factor models with descriptors, alpha models and attribution. It runs on Fincept’s servers; your agent sends numbers or data references and gets back a result envelope with tables and charts.
Fincept Portfolio Lab tools are free. They count toward the rate limit only; a
$fincept reference inside a call is charged like a direct call to that tool.Modules
Tools are grouped in modules. Each module is a toolset namedpflab_<module>, so you can list it or search within it. The Fincept Portfolio Lab reference lists every module and tool.
pflab_catalog returns the live list of modules and tools from inside your agent.
Inputs
Measures are annualised with
annualization_factor periods per year: 252 (the default) for daily data.
Limits
A computation that runs past its time limit answers
timeout; a busy engine answers busy and the call can be retried a few seconds later.
Outputs
Optimisers return the weights as a table and bar chart with the solver’s expected return and risk, every in-sample measure and the cumulative return and drawdown paths. Validation tools return the out-of-sample measures, paths and the weights at each rebalance;pflab_combinatorial_cv returns the distribution of each measure over many backtest paths and pflab_grid_search the score of every setting with the best pipeline’s weights. Analytics tools return the 46 measures, risk contributions and rolling measures; moment, prior and factor tools return estimates with heatmaps; factor-lab tools return descriptors, exposures, factor returns, information coefficients and attribution.
Example
Prompt
walk-forward portfolio backtest, finds pflab_walk_forward and pflab_compare_strategies, and passes each stock’s closes as a $fincept reference to market_get_candles, one data column per stock plus a date column from candles.time, with data_kind: "prices".