Skip to content

c00ler/rebalancer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Portfolio Rebalancing Service

Build

This service is not suitable for any production usage. The purpose is to showcase the algorithm only. Data, that is used by the service, is packaged inside the jar itself.

Dependencies

  • Java 11

Running tests

To run unit and integration tests execute the following command:

./mvnw clean verify

Running service locally

Build an executable jar:

./mvnw clean package

Output jar will always have the same name service. To run it, the following command can be used:

java -jar target/service.jar --server.port=8080

There is only one endpoint available POST /portfolios/rebalance. It will run rebalancing process for all customers and return status code 200 if operation was successful. An example of calling it using HTTPie:

http --verbose POST :8080/portfolios/rebalance

The result of the rebalancing will be available in the server logs. Rebalancing starts with message Starting rebalancing of all portfolios and ends with message Rebalancing finished.

As soon as service is using the static dataset, multiple calls of the endpoint should produce the same result. Over the time output will change because of the time, that is used for the age calculation.

Example output: Example output

Configuration

The maximum amount of trades per batch can be configured via fps.batch-size property in application.yml. Default value is 2. If removed, batch size will be 1 (no batching).

Input data

About

Financial Portfolio Rebalancing Service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages