Package: fPortfolio 4023.84.9000

Stefan Theussl

fPortfolio: Rmetrics - Portfolio Selection and Optimization

A collection of functions to optimize portfolios and to analyze them from different points of view.

Authors:Diethelm Wuertz [aut], Tobias Setz [aut], Yohan Chalabi [aut], William Chen [ctb], Stefan Theussl [aut, cre]

fPortfolio_4023.84.9000.tar.gz
fPortfolio_4023.84.9000.zip(r-4.5)fPortfolio_4023.84.9000.zip(r-4.4)fPortfolio_4023.84.9000.zip(r-4.3)
fPortfolio_4023.84.9000.tgz(r-4.4-any)fPortfolio_4023.84.9000.tgz(r-4.3-any)
fPortfolio_4023.84.9000.tar.gz(r-4.5-noble)fPortfolio_4023.84.9000.tar.gz(r-4.4-noble)
fPortfolio_4023.84.9000.tgz(r-4.4-emscripten)fPortfolio_4023.84.9000.tgz(r-4.3-emscripten)
fPortfolio.pdf |fPortfolio.html
fPortfolio/json (API)

# Install 'fPortfolio' in R:
install.packages('fPortfolio', repos = c('https://r-forge.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://r-forge.r-project.org/projects/rmetrics

Datasets:

On CRAN:

6.99 score 1 stars 2 packages 195 scripts 2.7k downloads 377 exports 48 dependencies

Last updated 28 days agofrom:d12c4f133f. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 24 2024
R-4.5-winOKOct 24 2024
R-4.5-linuxOKOct 24 2024
R-4.4-winNOTEOct 24 2024
R-4.4-macNOTEOct 24 2024
R-4.3-winNOTEOct 24 2024
R-4.3-macNOTEOct 24 2024

Exports:.fportfolio.plot.1.fportfolio.plot.2.fportfolio.plot.3.fportfolio.plot.4.fportfolio.plot.5.fportfolio.plot.6.fportfolio.plot.7.fportfolio.plot.8addRainbowamplDataAddamplDataAddMatrixamplDataAddValueamplDataAddVectoramplDataOpenamplDataSemicolonamplDataShowamplLPamplLPControlamplModelAddamplModelOpenamplModelShowamplNLPamplNLPControlamplOutShowamplQPamplQPControlamplRunAddamplRunOpenamplRunShowbacktestAssetsPlotbacktestDrawdownPlotbacktestPlotbacktestPortfolioPlotbacktestRebalancePlotbacktestReportPlotbacktestStatsbacktestWeightsPlotbcpAnalyticsbudgetsModifiedESbudgetsModifiedVARbudgetsNormalESbudgetsNormalVARbudgetsSampleCOVcmlLinescmlPointscovEstimatorcovMcdEstimatorcovOGKEstimatorcovRiskcovRiskBudgetsLinePlotcovRiskBudgetsPiecovRiskBudgetsPlotcvarRiskDatadrawdownsAnalyticsefficientPortfolioemaSmoothereqsumWConstraintsequalWeightsPointsequidistWindowsfeasibleGridfeasiblePortfoliofrontierPlotfrontierPlotControlfrontierPointsgarchAnalyticsgetAgetA.fPFOLIOSPECgetA.fPORTFOLIOgetAlphagetAlpha.fPFOLIOSPECgetAlpha.fPFOLIOVALgetAlpha.fPORTFOLIOgetConstraintsgetConstraints.fPORTFOLIOgetConstraintsTypesgetControlgetControl.fPFOLIOSPECgetControl.fPORTFOLIOgetCovgetCov.fPFOLIODATAgetCov.fPORTFOLIOgetCovRiskBudgetsgetCovRiskBudgets.fPFOLIOVALgetCovRiskBudgets.fPORTFOLIOgetDatagetData.fPFOLIODATAgetData.fPORTFOLIOgetEstimatorgetEstimator.fPFOLIODATAgetEstimator.fPFOLIOSPECgetEstimator.fPORTFOLIOgetMeangetMean.fPFOLIODATAgetMean.fPORTFOLIOgetMessagesgetMessages.fPFOLIOBACKTESTgetMessages.fPFOLIOSPECgetModel.fPFOLIOSPECgetModel.fPORTFOLIOgetMugetMu.fPFOLIODATAgetMu.fPORTFOLIOgetNAssetsgetNAssets.fPFOLIODATAgetNAssets.fPORTFOLIOgetNFrontierPointsgetNFrontierPoints.fPFOLIOSPECgetNFrontierPoints.fPFOLIOVALgetNFrontierPoints.fPORTFOLIOgetObjectivegetObjective.fPFOLIOSPECgetObjective.fPORTFOLIOgetOptimgetOptim.fPFOLIOSPECgetOptim.fPORTFOLIOgetOptimizegetOptimize.fPFOLIOSPECgetOptimize.fPORTFOLIOgetOptionsgetOptions.fPFOLIOSPECgetOptions.fPORTFOLIOgetParamsgetParams.fPFOLIOSPECgetParams.fPORTFOLIOgetPortfoliogetPortfolio.fPFOLIOSPECgetPortfolio.fPFOLIOVALgetPortfolio.fPORTFOLIOgetRiskFreeRategetRiskFreeRate.fPFOLIOSPECgetRiskFreeRate.fPFOLIOVALgetRiskFreeRate.fPORTFOLIOgetSeriesgetSeries.fPFOLIODATAgetSeries.fPORTFOLIOgetSigmagetSigma.fPFOLIODATAgetSigma.fPORTFOLIOgetSmoothergetSmoother.fPFOLIOBACKTESTgetSmootherDoubleSmoothinggetSmootherDoubleSmoothing.fPFOLIOBACKTESTgetSmootherFungetSmootherFun.fPFOLIOBACKTESTgetSmootherInitialWeightsgetSmootherInitialWeights.fPFOLIOBACKTESTgetSmootherLambdagetSmootherLambda.fPFOLIOBACKTESTgetSmootherParamsgetSmootherParams.fPFOLIOBACKTESTgetSmootherSkipgetSmootherSkip.fPFOLIOBACKTESTgetSolvergetSolver.fPFOLIOSPECgetSolver.fPORTFOLIOgetSpecgetSpec.fPORTFOLIOgetStatisticsgetStatistics.fPFOLIODATAgetStatistics.fPORTFOLIOgetStatusgetStatus.fPFOLIOSPECgetStatus.fPFOLIOVALgetStatus.fPORTFOLIOgetStrategygetStrategy.fPFOLIOBACKTESTgetStrategyFungetStrategyFun.fPFOLIOBACKTESTgetStrategyParamsgetStrategyParams.fPFOLIOBACKTESTgetTailRiskgetTailRisk.fPFOLIODATAgetTailRisk.fPFOLIOSPECgetTailRisk.fPORTFOLIOgetTailRiskBudgetsgetTailRiskBudgets.fPORTFOLIOgetTargetReturngetTargetReturn.fPFOLIOSPECgetTargetReturn.fPFOLIOVALgetTargetReturn.fPORTFOLIOgetTargetRiskgetTargetRisk.fPFOLIOSPECgetTargetRisk.fPFOLIOVALgetTargetRisk.fPORTFOLIOgetTracegetTrace.fPFOLIOSPECgetTrace.fPORTFOLIOgetTypegetType.fPFOLIOSPECgetType.fPORTFOLIOgetUnits.fPFOLIODATAgetUnits.fPORTFOLIOgetWeightsgetWeights.fPFOLIOSPECgetWeights.fPFOLIOVALgetWeights.fPORTFOLIOgetWindowsgetWindows.fPFOLIOBACKTESTgetWindowsFungetWindowsFun.fPFOLIOBACKTESTgetWindowsHorizongetWindowsHorizon.fPFOLIOBACKTESTgetWindowsParamsgetWindowsParams.fPFOLIOBACKTESTglpkLPglpkLPControlipopQPipopQPControlkendallEstimatorkestrelQPkestrelQPControllambdaCVaRlistFConstraintslpmEstimatormarkowitzHullmaxBConstraintsmaxBuyinConstraintsmaxCardConstraintsmaxddMapmaxFConstraintsmaxratioPortfoliomaxreturnPortfoliomaxsumWConstraintsmaxWConstraintsmcdEstimatorminBConstraintsminBuyinConstraintsminCardConstraintsminFConstraintsminriskPortfoliominsumWConstraintsminvariancePointsminvariancePortfoliominWConstraintsmodifiedVaRmonteCarloPointsmveEstimatornCardConstraintsneosLPneosLPControlneosQPneosQPControlnetPerformancenlminb2nlminb2Controlnlminb2NLPnlminb2NLPControlnnveEstimatornormalVaRparAnalyticspcoutAnalyticspfolioCVaRpfolioCVaRoptimpfolioCVaRpluspfolioHistpfolioMaxLosspfolioReturnpfolioTargetReturnpfolioTargetRiskpfolioVaRplot.fPORTFOLIOportfolioBacktestportfolioBacktestingportfolioConstraintsportfolioDataportfolioFrontierportfolioObjectiveportfolioReturnportfolioRiskportfolioSmoothingportfolioSpecprint.solverquadprogQPquadprogQPControlramplLPramplNLPramplQPrglpkLPripopripopQPriskBudgetsPlotriskMapriskmetricsAnalyticsrkestrelQPrneosLPrneosQPrnlminb2rnlminb2NLProllingCDaRrollingCmlPortfoliorollingCVaRrollingDaRrollingMinvariancePortfoliorollingPortfolioFrontierrollingSigmarollingTangencyPortfoliorollingVaRrollingWindowsrquadprogrquadprogQPrsolnpNLPrsolveLPrsolveQPrsymphonyLPsampleCOVsampleVaRsetAlpha<-setEstimator<-setNFrontierPoints<-setObjective<-setOptimize<-setParams<-setRiskFreeRate<-setSmootherDoubleSmoothing<-setSmootherFun<-setSmootherInitialWeights<-setSmootherLambda<-setSmootherParams<-setSmootherSkip<-setSolver<-setStatus<-setStrategyFun<-setStrategyParams<-setTailRisk<-setTargetReturn<-setTargetRisk<-setTrace<-setType<-setWeights<-setWindowsFun<-setWindowsHorizon<-setWindowsParams<-sharpeRatioLinesshrinkEstimatorsingleAssetPointsslpmEstimatorsolnpNLPsolnpNLPControlsolveRampl.CVARsolveRampl.MVsolveRglpk.CVARsolveRglpk.MADsolveRipopsolveRquadprogsolveRquadprog.CLAsolveRshortExactsolveRsocpsolveRsolnpspearmanEstimatorstabilityAnalyticssummary.fPORTFOLIOsymphonyLPsymphonyLPControltailoredFrontierPlottailRiskBudgetsPietailRiskBudgetsPlottangencyLinestangencyPointstangencyPortfoliotangencyStrategyternaryCoordternaryFrontierternaryMapternaryPointsternaryWeightsturnsAnalyticstwoAssetsLinesvarRiskwaveletSpectrumweightedReturnsLinePlotweightedReturnsPieweightedReturnsPlotweightsLinePlotweightsPieweightsPlotweightsSlider

Dependencies:bitopsbootclicpp11cubatureDEoptimRecodistenergyfAssetsfBasicsfCopulaefMultivargluegslgssigraphkernlablatticelifecyclemagrittrMASSMatrixMatrixModelsmnormtmvnormtestmvtnormnumDerivpkgconfigquadprogquantregRcppRCurlRglpkrlangrneosrobustbaseRsolnpslamsnSparseMspatialstabledistsurvivaltimeDatetimeSeriestruncnormvctrsXML

Readme and manuals

Help Manual

Help pageTopics
Portfolio Design, Optimization and BacktestingfPortfolio
Specification of backtesting portfoliossetBacktest setSmootherDoubleSmoothing<- setSmootherFun<- setSmootherInitialWeights<- setSmootherLambda<- setSmootherParams<- setSmootherSkip<- setStrategyFun<- setStrategyParams<- setWindowsFun<- setWindowsHorizon<- setWindowsParams<-
Portfolio backtest specification extractorsgetMessages.fPFOLIOBACKTEST getSmoother.fPFOLIOBACKTEST getSmootherDoubleSmoothing.fPFOLIOBACKTEST getSmootherFun.fPFOLIOBACKTEST getSmootherInitialWeights.fPFOLIOBACKTEST getSmootherLambda.fPFOLIOBACKTEST getSmootherParams.fPFOLIOBACKTEST getSmootherSkip.fPFOLIOBACKTEST getStrategy.fPFOLIOBACKTEST getStrategyFun.fPFOLIOBACKTEST getStrategyParams.fPFOLIOBACKTEST getWindows.fPFOLIOBACKTEST getWindowsFun.fPFOLIOBACKTEST getWindowsHorizon.fPFOLIOBACKTEST getWindowsParams.fPFOLIOBACKTEST
User defined functions to perform portfolio backtestingemaSmoother equidistWindows tangencyStrategy
Portfolio Backtest ExtractorsgetSmoother getSmootherDoubleSmoothing getSmootherFun getSmootherInitialWeights getSmootherLambda getSmootherParams getSmootherSkip getStrategy getStrategyFun getStrategyParams getWindows getWindowsFun getWindowsHorizon getWindowsParams
Portfolio backtesting net performancenetPerformance
Portfolio backtesting plotsbacktestAssetsPlot backtestDrawdownPlot backtestPlot backtestPortfolioPlot backtestRebalancePlot backtestReportPlot backtestWeightsPlot
Portfolio backtestingportfolioBacktesting portfolioSmoothing
Specification of portfolio backtestingportfolioBacktest
Rolling portfolio backtesting statisticsbacktestStats rollingCDaR rollingCVaR rollingDaR rollingRiskBudgets rollingSigma rollingVaR
Assets Data SetsdataSets ECON85 ECON85LONG GCCINDEX GCCINDEX.DF GCCINDEX.RET LPP2005 LPP2005.RET LPP2005.RET.DF SMALLCAP SMALLCAP.RET SMALLCAP.RET.DF SPISECTOR SPISECTOR.DF SPISECTOR.RET SWX SWX.DF SWX.RET
Portfolio backtesting specificationsclass-fPFOLIOBACKTEST fPFOLIOBACKTEST fPFOLIOBACKTEST-class show,fPFOLIOBACKTEST-method
Portfolio Constraints Handlingclass-fPFOLIOCON fPFOLIOCON fPFOLIOCON-class show,fPFOLIOCON-method
Portfolio Data Handlingclass-fPFOLIODATA fPFOLIODATA fPFOLIODATA-class portfolioData show,fPFOLIODATA-method
Specification of Portfoliosclass-fPFOLIOSPEC fPFOLIOSPEC fPFOLIOSPEC-class show,fPFOLIOSPEC-method
Values of Portfolio Frontiersclass-fPFOLIOVAL fPFOLIOVAL fPFOLIOVAL-class show,fPFOLIOVAL-method
Portfolio Classclass-fPORTFOLIO fPORTFOLIO fPORTFOLIO-class plot.fPORTFOLIO summary.fPORTFOLIO
Efficient Frontier PlotcmlLines cmlPoints equalWeightsPoints frontierPlot minvariancePoints monteCarloPoints sharpeRatioLines singleAssetPoints tailoredFrontierPlot tangencyLines tangencyPoints twoAssetsLines
Frontier Plot Control ListfrontierPlotControl
Get Frontier PointsfrontierPoints
Mathematical Linear ProgrammingamplLP amplLPControl glpkLP glpkLPControl neosLP neosLPControl ramplLP rglpkLP rneosLP rsolveLP rsymphonyLP symphonyLP symphonyLPControl
Mathematical Non-Linear ProgrammingamplNLP amplNLPControl nlminb2NLP nlminb2NLPControl ramplNLP rnlminb2 rnlminb2NLP rsolnpNLP solnpNLP solnpNLPControl
Mathematical Linear ProgrammingamplQP amplQPControl ipopQP ipopQPControl kestrelQP kestrelQPControl neosQP neosQPControl quadprogQP quadprogQPControl ramplQP ripopQP rkestrelQP rneosQP rquadprog rquadprogQP rsolveQP
plot-methods.fportfolio.plot.1 .fportfolio.plot.2 .fportfolio.plot.3 .fportfolio.plot.4 .fportfolio.plot.5 .fportfolio.plot.6 .fportfolio.plot.7 .fportfolio.plot.8 plot-methods
Portfolio Print Methodsshow,fPORTFOLIO-method show-methods
summary-methodssummary-methods
Monitoring StabilityaddRainbow bcpAnalytics drawdownsAnalytics garchAnalytics parAnalytics pcoutAnalytics riskmetricsAnalytics stabilityAnalytics turnsAnalytics waveletSpectrum
Constrained nonlinear minimizationnlminb2
Control variables for Rnlminb2nlminb2Control
Portfolio ConstraintseqsumWConstraints listFConstraints maxBConstraints maxBuyinConstraints maxCardConstraints maxFConstraints maxsumWConstraints maxWConstraints minBConstraints minBuyinConstraints minCardConstraints minFConstraints minsumWConstraints minWConstraints nCardConstraints portfolioConstraints
Covariance EstimatorscovEstimator covMcdEstimator covOGKEstimator kendallEstimator lpmEstimator mcdEstimator mveEstimator nnveEstimator shrinkEstimator slpmEstimator spearmanEstimator
portfolioData2portfolioData2
Efficient PortfoliosefficientPortfolio maxratioPortfolio maxreturnPortfolio minriskPortfolio minvariancePortfolio tangencyPortfolio
Feasible PortfoliosfeasiblePortfolio
Portfolio Data Extractor FunctionsgetCov.fPFOLIODATA getData.fPFOLIODATA getEstimator.fPFOLIODATA getMean.fPFOLIODATA getMu.fPFOLIODATA getNAssets.fPFOLIODATA getSeries.fPFOLIODATA getSigma.fPFOLIODATA getStatistics.fPFOLIODATA getTailRisk.fPFOLIODATA getUnits.fPFOLIODATA
Extractor FunctionsgetAlpha getConstraints getControl getCov getCovRiskBudgets getData getDefault getEstimator getMean getModel getMu getNAssets getNFrontierPoints getObjective getOptim getOptimize getOptions getParams getPortfolio getRiskFreeRate getSeries getSigma getSolver getSpec getStatistics getStatus getTailRisk getTailRiskBudgets getTargetReturn getTargetRisk getTrace getType getUnits getWeights
Portfolio Class ExtractorsgetA.fPORTFOLIO getAlpha.fPORTFOLIO getConstraints.fPORTFOLIO getConstraintsTypes getControl.fPORTFOLIO getCov.fPORTFOLIO getCovRiskBudgets.fPORTFOLIO getData.fPORTFOLIO getEstimator.fPORTFOLIO getMean.fPORTFOLIO getModel.fPORTFOLIO getMu.fPORTFOLIO getNAssets.fPORTFOLIO getNFrontierPoints.fPORTFOLIO getObjective.fPORTFOLIO getOptim.fPORTFOLIO getOptimize.fPORTFOLIO getOptions.fPORTFOLIO getParams.fPORTFOLIO getPortfolio.fPORTFOLIO getRiskFreeRate.fPORTFOLIO getSeries.fPORTFOLIO getSigma.fPORTFOLIO getSolver.fPORTFOLIO getSpec.fPORTFOLIO getStatistics.fPORTFOLIO getStatus.fPORTFOLIO getTailRisk.fPORTFOLIO getTailRiskBudgets.fPORTFOLIO getTargetReturn.fPORTFOLIO getTargetRisk.fPORTFOLIO getTrace.fPORTFOLIO getType.fPORTFOLIO getUnits.fPORTFOLIO getWeights.fPORTFOLIO
Portfolio Specification Extractor FunctionsgetA getA.fPFOLIOSPEC getAlpha.fPFOLIOSPEC getControl.fPFOLIOSPEC getEstimator.fPFOLIOSPEC getMessages getMessages.fPFOLIOSPEC getModel.fPFOLIOSPEC getNFrontierPoints.fPFOLIOSPEC getObjective.fPFOLIOSPEC getOptim.fPFOLIOSPEC getOptimize.fPFOLIOSPEC getOptions.fPFOLIOSPEC getParams.fPFOLIOSPEC getPortfolio.fPFOLIOSPEC getRiskFreeRate.fPFOLIOSPEC getSolver.fPFOLIOSPEC getStatus.fPFOLIOSPEC getTailRisk.fPFOLIOSPEC getTargetReturn.fPFOLIOSPEC getTargetRisk.fPFOLIOSPEC getTrace.fPFOLIOSPEC getType.fPFOLIOSPEC getWeights.fPFOLIOSPEC
PortfolioVal Extractor FunctionsgetAlpha.fPFOLIOVAL getCovRiskBudgets.fPFOLIOVAL getNFrontierPoints.fPFOLIOVAL getPortfolio.fPFOLIOVAL getRiskFreeRate.fPFOLIOVAL getStatus.fPFOLIOVAL getTargetReturn.fPFOLIOVAL getTargetRisk.fPFOLIOVAL getWeights.fPFOLIOVAL
portfolioRiskcovRisk cvarRisk pfolioRisk varRisk
Efficient Portfolio FrontierportfolioFrontier
Specification of PortfoliosportfolioSpec
Risk and Related Measures for PortfolioslambdaCVaR pfolioCVaR pfolioCVaRoptim pfolioCVaRplus pfolioHist pfolioMaxLoss pfolioReturn pfolioSigma pfolioTargetReturn pfolioTargetRisk pfolioVaR riskPfolio
Rolling PortfolioportfolioRolling rollingCmlPortfolio rollingMinvariancePortfolio rollingPortfolio rollingPortfolioFrontier rollingTangencyPortfolio rollingWindows
Settings for Specifications of PortfoliossetAlpha<- setEstimator<- setNFrontierPoints<- setObjective<- setOptimize<- setParams<- setRiskFreeRate<- setSolver<- setSpec setStatus<- setTailRisk<- setTargetReturn<- setTargetRisk<- setTrace<- setType<- setWeights<-
Risk BudgetingbudgetsModifiedES budgetsModifiedVAR budgetsNormalES budgetsNormalVAR budgetsSampleCOV modifiedVaR normalVaR sampleCOV sampleVaR
Surface Risk AnalyticsfeasibleGrid markowitzHull
Creates and Plots a Ternary MapmaxddMap riskMap ternaryCoord ternaryFrontier ternaryMap ternaryPoints ternaryWeights
Nonlinear Objective PresettingsData portfolioObjective portfolioReturn portfolioRisk
AMPL InterfaceamplDataAdd amplDataAddMatrix amplDataAddValue amplDataAddVector amplDataOpen amplDataSemicolon amplDataShow amplModelAdd amplModelOpen amplModelShow amplOutShow amplRunAdd amplRunOpen amplRunShow
LP, QP, and NLP Programming SolverssolveRampl.CVAR solveRampl.MV solveRglpk.CVAR solveRglpk.MAD solveRipop solveRquadprog solveRquadprog.CLA solveRshortExact solveRsocp solveRsolnp
Print Method for Solversprint.solver
Portfolio Weights Line PlotscovRiskBudgetsLinePlot weightedReturnsLinePlot weightsLinePlot
Portfolio Pie PlotscovRiskBudgetsPie tailRiskBudgetsPie weightedReturnsPie weightsPie
Portfolio Weights SliderweightsSlider
Portfolio Weights Bar PlotscovRiskBudgetsPlot riskBudgetsPlot tailRiskBudgetsPlot weightedReturnsPlot weightsPlot