Comments (6)
I did a bug-fixing pass, I believe everything in the examples works right now.
from cvxportfolio.
Fixes in your current fork (jonathanng/cvxportfolio) seem reasonable, yet the examples do not work:
(1) Need to fix keyword change in call to MarketSimulator in HelloWorld and SinglePeriodOptimization
(2) After the name change the, HelloWorld gives reasonable results, but SinglePeriodOptimization gives negative returns for most of the coarse search parameters. The results do not correspond to plots in the notebook in the repository ( or in the paper).
Thanks.
from cvxportfolio.
Try the examples in my branch. Those should work.
from cvxportfolio.
Hi @jonathanng,
Thanks for getting back.
I tried your master branch (https://github.com/jonathanng/cvxportfolio, latest commit). My earlier comments are about the examples and the code in that branch (using the latest available versions of python 3.6 and notebook on Homebrew).
HelloWorld errors out in call to MarketSimulator:
TypeError Traceback (most recent call last)
in ()
2 market_returns = returns,
3 costs = [tcost_model, hcost_model],
----> 4 cash_key = 'USDOLLAR'
5 )
6
TypeError: init() got an unexpected keyword argument 'market_returns'
Upon correcting the keyword to your March 2 commit, the notebook runs and gives reasonable results.
PortfolioSimulation.ipynb also needs the same correction. However, it generates results that are very different ( Active Risk at 19.3%) from those in the notebook on github.
SinglePeriodOptimization also generates very different results after the keyword correction. Most of the results of coarse search have very large negative excess returns.
Please re-run the examples. If you post the corrections in your branch I will be happy to test them out.
from cvxportfolio.
Can you please let me know where I can find fixed examples. It's been a year, so I assume the master branch must have been updated, but I still see the same error on MPOReturnsForecast with abstract methods weight_expr. TIA.
from cvxportfolio.
I did a bug-fixing pass, I believe everything in the examples works right now.
Hi @enzobusseti,
I'm still running into problems trying to instiantiate MPOReturnsForecast
class as well after cloning and installing the latest master
branch here. Is the fix here simply to create a dummy weight_expr()
method for the class since it's not being used?
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-24-d1b92aa49092> in <module>
----> 1 returns_forecast = cp.MPOReturnsForecast(all_return_estimates)
2 results_MPO={}
TypeError: Can't instantiate abstract class MPOReturnsForecast with abstract methods weight_expr
from cvxportfolio.
Related Issues (20)
- pip install complains of scipy<1.11.0 HOT 4
- User provided returns forecast (`r_hat`) can be problematic HOT 1
- Interest rate on short sell cash proceeds
- Error from sp500_ndx100 example HOT 1
- Issue When Running examples/sp500_ndx100.py HOT 5
- I HOT 2
- NaN Handling HOT 3
- MultiPeriodOptimization Behavior Documentation HOT 10
- Single-step use question HOT 5
- do_asset_selection potential bug HOT 3
- Pandas 2.2.0 causes issues HOT 1
- Possible issue when using Cvxportfolio's internet access through a VPN HOT 4
- Make test suite fail on warnings
- Questions on accounting model (e.g., for short positions) HOT 3
- Robustify online execution of example strategies (when open prices are missing) HOT 1
- Failure on non-numeric (object dtpye) user-provided data difficult to understand HOT 6
- Example request - Margin in a different currency HOT 14
- BUG: packaging failed to include modules moved into submodules (constraints, data)
- Feature request: handle user-defined time-varying universes (and better error checks with temporary `nan`s in user-provided returns) HOT 13
- Data quality issues in `ftse100_daily` example strategy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cvxportfolio.