Announcing PortfolioAnalytics.jl: Tool for Quantitative Portfolio Analytics

Tool for Quantitative Portfolio Analytics

I’m happy to announce PortfolioAnalytics.jl, which aims to provide users with functionality for performing quantitative portfolio analytics.

Introduction · PortfolioAnalytics.jl (doganmehmet.github.io)

The package is under heavy development, and new functionalities will be added as part of ongoing releases.

The following functions are available in the stable version:

  • Return( )
  • PortfolioReturn( )
  • SharpeRatio( )
  • VaR( )
  • PortfolioOptimize( )
  • MeanReturns( )
  • StdDev( )
  • Moments( )
  • ExpectedShortfall( )

This package generally requires return (rather than price) data. Almost all functions will work with any periodicity, from annual, monthly, daily, to even minutes and seconds, either regular or irregular.

Getting started

  • The best place to get started with PortfolioAnalytics is the Tutorials section of the documentation, where you can find the demonstration of functions’ use.
  • Go to the Installation guide to learn how you can install PortfolioAnalytics.
  • Read the Functions section to see functions’ parameters and default arguments.

Acknowledgement

The package is inspired by PerformanceAnalytics and PortfolioAnalytics packages in R and pyfolio in Python.

I sincerely thank @odow for patiently answering my questions on JuMP, @kellertuer for helping me figure out the issues with documentation, @chiraganand and @pdeffebach for TSFrames package, and answering my questions.

Contributions are most welcome

I greatly value contributions of any kind. Contributions could include but are not limited to documentation improvements, bug reports, new or improved code, scientific and technical code reviews, community help/building, education, and outreach.

Please report any issues via the GitHub issue tracker. All kinds of issues are welcome and encouraged; this includes bug reports, documentation typos, feature requests, etc.

16 Likes

v0.2.1 released

Release notes:

Julia version requirement is updated to v1.7

Required versions for the following packages are updated:

  • JuMP to v1.8.2
  • MultiObjectiveAlgorithms to v0.1.4

Functions are renamed to align with rest of the Julia ecosystem.

  • Return( ) → asset_return( )
  • VaR ( ) - value_at_risk( )
  • PortfolioReturn( ) → portfolio_return( )
  • MeanReturn( ) → mean_return( )
  • StdDev( ) → stddev( )
  • Moments( ) → moments( )
  • PortfolioOptimize( ) → portfolio_optimize( )
  • SharpeRatio( ) → sharpe( )
  • ExpectedShortfall( ) → es( )

The update includes fixes of typos in the documentation as well.

What was the motivation for this? v1.6 is the long-term support version of Julia, so it’s the one I use every day.

1 Like

Because one of the dependent library, TSFrames.jl, requires at least 1.7 and it is throwing error because of it.

:frowning_face: you could try a PR to TSFrames that dropped support back to Julia v1.6. I don’t know if there’s any particular reason why it can’t support Julia v1.6.

2 Likes

Many thanks for the advice. Opened an issue. As soon as v1.6 is supported by TSFrames, I will drop support to v1.6.

2 Likes

@chiraganand @pdeffebach

@mdogan Thanks for the PR! Merged it, will release a new version soon with this and other changes.

2 Likes

v0.2.2 released

Release notes:

  • Julia requirement dropped to v1.6(LTS)

  • TSFrames (dependency) requirement updated to v0.2.1

  • The default mean method for the mean_return( ) function changed to the geometric mean

  • Two new functions added:

    • drawdowns( ) - calculates the drawdowns and maximum drawdown of an asset(s) or portfolio over time
    • cumulative_return( ) - calculates the cumulative return of an asset(s)
  • Documentation is updated.

The package is also tested on Julia v1.9; the output is as expected.

2 Likes