TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: CashGraphs – A securities portfolio optimizer

82 点作者 justinluther将近 3 年前
Hello,<p>This is a portfolio optimizer I made to help select portfolios for my clients. I&#x27;m a personal financial adviser. I generally put my clients in a mix of low-fee index funds and ETFs and I use this to set an appropriate allocation based on the client&#x27;s risk tolerance.<p>I have been working on this as a side project to 1) improve the theoretical underpinnings of my investment recommendations and 2) improve my coding skills with frameworks like Vue and Torch. Here&#x27;s the repository for the frontend: <a href="https:&#x2F;&#x2F;github.com&#x2F;justinluther502&#x2F;cashgraphfront" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;justinluther502&#x2F;cashgraphfront</a>.<p>The frontend site is Vue 2 + Vuetify, and the backend is an AWS lambda function running the Torch optimizer. I am still working out kinks in the backend, particularly cold-start issues because the Lambda function has to load the entire Torch library (~2GB). This occasionally causes the AWS API Gateway to reach max timeout before the Lambda function finishes. Any tips on addressing this would be much appreciated. My first thought is maybe to pare down the Torch library used in the Lambda function because I am only using a small subset of the full library.<p>The optimizer function itself is designed to overcome several classic shortcomings in Modern Portfolio Theory (MPT) (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Modern_portfolio_theory" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Modern_portfolio_theory</a>). Unlike textbook implementations of MPT, this optimizer can utilize non-normal returns distributions, risk metrics besides variance, and can allow the user to specify tail behavior, such as asset correlations behaving normally most of the time but converging to 1.0 in severe downturns. Most of these &quot;fixes&quot; happen during the generation of custom &quot;flavors&quot;, or asset selection universes. I have 3 flavors pre-built and there is some information on how they are constructed in the flavor selection page.<p>Any feedback greatly appreciated!<p>Justin Luther justinluther@lutherwealth.com <a href="https:&#x2F;&#x2F;www.lutherwealth.com" rel="nofollow">https:&#x2F;&#x2F;www.lutherwealth.com</a>

9 条评论

thelamest将近 3 年前
Like the idea and execution a lot! Being IANAF, I like to refer people to chapters 4–7 of this lecture from Robert Shiller’s “Financial Markets” Yale course: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;_B_24GUWdSM?t=1269" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;_B_24GUWdSM?t=1269</a> (~40 minutes). The concept gives a solid insight into why and (broadly) how to diversify. With your work, a very minor note is that the chartjs pie chart always fully redraws for me from the 12 o’clock position on risk preference changes, which makes visual comparisons minimally more difficult. It’s purely cosmetic, because the table communicates this much better anyway, but maybe it’s an easy fix.
评论 #32122940 未加载
ac29将近 3 年前
The default portfolios are weird.<p>The Six Asset classic (the default) includes Japanese stocks, and Emerging Market Corporate bonds, but no other international assets?<p>The basic stock and bond includes only high yield bonds?<p>The 12 asset includes international stocks and international bonds but then specifically adds additional Canadian stocks and Canadian bonds on top of that?
评论 #32120041 未加载
divbzero将近 3 年前
&gt; <i>I am still working out kinks in the backend, particularly cold-start issues because the Lambda function has to load the entire Torch library (~2GB). This occasionally causes the AWS API Gateway to reach max timeout before the Lambda function finishes.</i><p>I could not find your backend code to confirm, but I suspect you could convert that Lambda function into a long-running app to avoid cold-start issues. This could be deployed with an app engine (<i>e.g.</i> Heroku, Google App Engine, AWS Elastic Beanstalk), as a Docker container (<i>e.g.</i> AWS EKS), or directly on a server (<i>e.g.</i> AWS EC2). Feel free to contact me via my profile, happy to point you in the right direction.
评论 #32124744 未加载
mNovak将近 3 年前
Looks nice, but I&#x27;m confused how to read the Expected Returns y-axis. My assumption would be that&#x27;s an annualized ROI, but it&#x27;s displaying for instance that US Stocks return 0.7% ? Also no idea if Risk has any objective unit?<p>Running the 6 asset classic, it is slightly amusing that the result is essentially just a classic 70-30 stock&#x2F;bond mix (risk dependent obviously), and the other 4 assets are &lt;5% of portfolio.<p>Would be nice if you could include also representative ETFs of a given asset class (I assume they exist) to make the results more actionable.
评论 #32121089 未加载
igorkraw将近 3 年前
Looks neat, but it&#x27;s a bit unclear to me how to read the Pareto frontier graph. Also, would you share your references for the fixed you implemented&#x2F;give recommendations for papers&#x2F;books that can give useful domain knowledge to an ML person reading up on portfolio optimisation? I.e. the &quot;actually useful&quot; parts of the literature?
评论 #32119810 未加载
imakwana将近 3 年前
Great tool! Thanks for building this.<p>I noticed lack of below asset classes in the list:<p>1) US Small Cap Stocks (e.g. Russell 2000 Index) 2) International Large Cap Stocks (MSCI EAFE Index) 3) International Small Cap Stocks (MSCI EAFE Index) 4) Emerging Market Large Cap Stocks (MSCI Emerging Markets Index)<p>Adding these would greatly improve the optimizer.
1autodev将近 3 年前
Idea to make it more user friendly to folks like myself who don&#x27;t understand how your app is supposed to work:<p>Provide a UI layer which contains some instructions and points out features and their uses. Looking at the app, I don&#x27;t quite know what I am supposed to do, or use it to figure out. Perhaps provide some example use cases or personas, alongside the UI layer of instructions.
评论 #32121402 未加载
readme将近 3 年前
please keep working on this<p>i suspect it&#x27;s not going to be free for very long<p>if it remains open source there&#x27;s something no other fintech app has
评论 #32121134 未加载
anewpersonality将近 3 年前
How does this compare to mlfinlab?
评论 #32120068 未加载