Giter Club home page Giter Club logo

ojalgo-finance's Introduction

ojAlgo-finance

Build Status Language grade: Java Maven Central

Historically the development of ojAlgo was motivated by various financial applications and finance (domain) specific code was an integral part of ojAlgo. With the release of ojAlgo v44 the finance specific stuff was moved to its own repository/artifact โ€“ ojAlgo-finance. With ojAlgo v51 that move is reverted.

  • ojAlgo v44.0.0 <> ojAlgo-finance v1.0.0 (first release as a separate artifact)
  • ojAlgo v50.0.0 <> ojAlgo-finance v2.4.1 (last release as a separate artifact)

This repository has simply been left as it was, but its contents have been copied to the core project (ojAlgo) and will be maintained further there. In the copy-process the package names also changed. Here's a table mapping out the repository/artifact and package move:

ojAlgo-finance ojAlgo
org.ojalgo.finance org.ojalgo.data.domain.finance
org.ojalgo.finance.portfolio org.ojalgo.data.domain.finance.portfolio
org.ojalgo.finance.portfolio.simulator org.ojalgo.data.domain.finance.portfolio.simulator
org.ojalgo.finance.data org.ojalgo.data.domain.finance.series
org.ojalgo.finance.data.fetcher org.ojalgo.data.domain.finance.series
org.ojalgo.finance.data.parser org.ojalgo.data.domain.finance.series
org.ojalgo.finance.scalar org.ojalgo.scalar
org.ojalgo.finance.business not moved, wont be maintained

General information about ojAlgo and ojAlgo-finance is available at the project web site: http://ojalgo.org/

Artifacts

ojAlgo-finance is available at The Central (Maven) Repository to be used with your favourite dependency management tool.

<dependency>
    <groupId>org.ojalgo</groupId>
    <artifactId>ojalgo-finance</artifactId>
    <version>X.Y.Z</version>
</dependency>

ojalgo-finance's People

Contributors

apete avatar dependabot[bot] avatar stefanvanegmond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ojalgo-finance's Issues

Allow options to be set for MarkowitzModel

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()

Verify downloading Yahoo Finance historical data from different locations

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.

https://github.com/optimatika/ojAlgo-finance/blob/develop/src/test/java/org/ojalgo/finance/data/fetcher/YahooFetcherTest.java

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:

https://www.charlesproxy.com

It's a commercial product, but they offer a free trial.

Google Finance stopped historical data service

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.

"debug_appender" no such field

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)

Travis's failing

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?

MarkowitzModel expected input parameters

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.