HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
PyPortfolio
PyPortfolioOpt
Jupyter Notebook2019–2020
PyPortfolio / PyPortfolioOpt

PyPortfolioOpt

Financial portfolio optimization in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity

2Distinct people
2Mentions
0Explicit recommenders
6.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Financial portfolio optimization in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month2 dated mentions

Observed mentions: 2019-12-19 05:21:08 UTC to 2020-09-10 07:46:02 UTC.

012019-12-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsDec 20192020-01-01 00:00:00 UTC to 2020-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-02-01 00:00:00 UTC to 2020-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-03-01 00:00:00 UTC to 2020-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-04-01 00:00:00 UTC to 2020-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 20202020-05-01 00:00:00 UTC to 2020-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-01 00:00:00 UTC to 2020-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-07-01 00:00:00 UTC to 2020-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-08-01 00:00:00 UTC to 2020-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-09-01 00:00:00 UTC to 2020-10-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Dec 20192019-12-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
Jan 20202020-01-01 00:00:00 UTC2020-02-01 00:00:00 UTC000
Feb 20202020-02-01 00:00:00 UTC2020-03-01 00:00:00 UTC000
Mar 20202020-03-01 00:00:00 UTC2020-04-01 00:00:00 UTC000
Apr 20202020-04-01 00:00:00 UTC2020-05-01 00:00:00 UTC000
May 20202020-05-01 00:00:00 UTC2020-06-01 00:00:00 UTC000
Jun 20202020-06-01 00:00:00 UTC2020-07-01 00:00:00 UTC000
Jul 20202020-07-01 00:00:00 UTC2020-08-01 00:00:00 UTC000
Aug 20202020-08-01 00:00:00 UTC2020-09-01 00:00:00 UTC000
Sep 20202020-09-01 00:00:00 UTC2020-10-01 00:00:00 UTC101

What Hacker News says

2 sources
Yes, that's right. What you want to do is maximize your sharpe ratio. You can play around with this python package to get a sense for how it works: https://github.com/robertmartin8/PyPortfolioOpt What you should be trying to achieve is a portfolio that earns the exact same return every single year, and you can do that in part by looking at historical covariance of the asset's time series. However, you also want to take a prospective view, and think about which asset classes may become correlated in the future. There's no universal answer here (in the out of sample case - you can solve it in-sample), however. And another huge, huge factor is tax. Making sure your investments are tax-efficient is extremely important. Nothing will do more to ruin your compounding than taxes. So whatever you do, carefully consider the tax implications of your
Read the rest
choices. A lot of people focus on the tax rate. But what's actually quite a bit more important is the tax frequency. If you pay long term capital gains every two years on your whole portfolio...that's much worse than paying short term capital gains once at the very end (over a long period). What this means is that you want to choose things like passive ETFs, that are not taxed on their internal rebalancing. Even if you were to find a mutual fund that beat that ETF by 1% every year, the tax consequences of that fund would likely make it not worthwhile, before even considering the high fees it would likely charge you.
In Annual Returns on Stock, T.Bonds and T.Bills: 1928 – Current

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.