optimatika / ojalgo-finance Goto Github PK
View Code? Open in Web Editor NEWFinance (domain) specific extensions to ojAlgo
Home Page: http://ojalgo.org
License: MIT License
Finance (domain) specific extensions to ojAlgo
Home Page: http://ojalgo.org
License: MIT License
It seems that Travis has exactly the same problem as I had locally,
Downloading from apache-snapshots:
https://repository.apache.org/snapshots/org/ojalgo/ojalgo/45.0.0-SNAPSHOT/ojalgo-45.0.0-SNAPSHOT.jar
Maybe it might make sense to depend on a fixed version?
Or, alternatively, do
.before_script:
- git clone https://github.com/optimatika/ojAlgo.git
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -f ojAlgo/pom.xml
in travis.yml
?
It seems Google Finance no longer makes it possible to download historical data.
Tests related to this have been turned off.
See if it's possible to get this working again, identify (and implement) one or two alternatives.
See if it's possible to get this working again.
Is your feature request related to a problem? Please describe.
When I test MarkowitzModel performance I sometimes have non converging problems. (See a 4 assets example below)
Describe the solution you'd like
I'd like to be able to set options on the MarkowitzModel solver to be able to have a sufficient solution, or less required precision...
"Easy" way is to change visibility of getOptimisationOptions method in OptimisedPortfolio abstract class
Describe alternatives you've considered
Subclass MarkowitzModel but it is currently final
Copy part of code and implement solution in my project -> 5 classes involved and not robust
Investigate why it does not converge, I'd guess it is when returns and variances are close for two assets...
Additional context
**** Inputs :
coVarMatrix = org.ojalgo.matrix.PrimitiveMatrix < 4 x 4 >
{ { 0.19828575384387814, 0.19939590712485014, 0.04848819110209297, 0.001060547131952715 },
{ 0.19939590712485014, 0.17420946085220315, 0.05503998250848539, 0.09756310857237219 },
{ 0.04848819110209297, 0.05503998250848539, 0.03544331442632964, 0.08244505440089961 },
{ 0.001060547131952715, 0.09756310857237219, 0.08244505440089961, 0.18516185344938874 } }
returns = org.ojalgo.matrix.PrimitiveMatrix < 4 x 1 >
{ { 0.16373354541629026 },
{ 0.007304578002244022 },
{ 0.05247478842401128 },
{ 0.12286070470561875 } }
riskAversion = 1
*** Test
MarketEquilibrium marketEquilibrium = new MarketEquilibrium(coVarMatrix,riskAversion);
markowitzModel = new MyMarkowitzModel(marketEquilibrium,returns);
markowitzModel.getWeights()
It's now possible to download historical data from Yahoo Finance again. That is, it works for me....
I'm in Sweden. Possibly it works for everyone in the EU - I don't know - but I do know that it doesn't work if you're outside the EU (like Switzerland or India).
Please run this test case and report here if you have any new info regarding from where it works.
If the test case fails then please debug to try and find out where/how it goes wrong. When you do that it's very helpful to run the http communication through a proxy that lets you see all requests, responses, cookies, redirects and whatever. One such tool that works great is Charles:
It's a commercial product, but they offer a free trial.
It looks like okAlgo dropped the debug_append
field. The okAlgo-finance 1.0.0
works fine with okAlgo 44.0.0
but is broken with okAlgo 45.1.0
.
java.lang.NoSuchFieldError: debug_appender
at org.ojalgo.finance.portfolio.MarkowitzModel.calculateAssetWeights(MarkowitzModel.java:226)
at org.ojalgo.finance.portfolio.EquilibriumModel.getAssetWeights(EquilibriumModel.java:86)
at org.ojalgo.finance.portfolio.EquilibriumModel.getWeights(EquilibriumModel.java:134)
Hello,
Unfortunately, it's not clear from documentation what kind of input data is expected for MarkowitzModel.
Signature for the constructor is the following:
public MarkowitzModel(final BasicMatrix covarianceMatrix, final BasicMatrix expectedExcessReturns) {
So, is there expected returns calculated as "today close"/"yesterday close"-1
or it's logarithmic return ln("today close"/"yesterday close")
.
The same question is for covariance matrix: is it expecting co-variance between natural returns or logarithmic?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.