Comments (3)
This is often caused by bad data. I'd check if you don't have any insane outliers in your data. I can't look into this if you don't post a replicable example.
from universal-portfolios.
I want to explore the impact of different metrics on the BCRP model. I found that, except for 'return,' which consistently converges to the optimal solution, other metrics tend to converge to local optima.
Below is a part of my code:
@metrics = ['return', 'drawdown', 'ulcer', 'sharpe','sortino']
for metric in metrics:
# Run the BCRP model and calculate weights
algo = BCRP(metric=metric)
result = algo.run(predicted_prices)
weights = result.weights
# Calculate returns
returns = pyfolio_backtest(weights, dff_test.set_index('date'))[0]['Annual return']
# Update the best metric
if returns > best_return:
best_return = returns
best_metric = metric
best_metric_per_period.append(best_metric)
from universal-portfolios.
I found that, except for 'return,' which consistently converges to the optimal solution, other metrics tend to converge to local optima.
That's how BCRP works by definition - it finds weights that maximize return. There are no guarantees for other metrics.
from universal-portfolios.
Related Issues (20)
- It seem like the two functions "run" and "run_combination" do not calculate the same the total_wealth? HOT 6
- some question about the transaction cost code HOT 1
- Question about data format HOT 3
- Data reference HOT 2
- ModuleNotFoundError: No module named 'scipy.special'
- Question about data and TCO algorithm
- Invalid equity result using result weight
- MaybeEncodingError while using the run_combination() method
- Issue with Mac M1 HOT 2
- Data information HOT 3
- 2 questions HOT 1
- Installation Issues HOT 10
- specifying the args of CORN class HOT 8
- a self.eta error in TCO
- Try to include transaction cost into OLMAR, but does not work HOT 1
- Assertion error # update logarithms, fees, etc. AssertionError:` HOT 2
- tools.simplex_project() returns the largest positive vector only? HOT 1
- There are several FeatureWarnings with the code
- Equity calculation, shift issue? HOT 1
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 universal-portfolios.