Skip to content

urv/trading-framework-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

trading-framework-common

Optimization Framework.

Rationale.

TODO.

Example.

You could use MonadicComprehensions or do expression in order to define your computation (may be monadic and partial) you want to maximize. Like

import Optimization.SimulatedAnnealing

objective = [ sin x + y * cos z `at` (x, y) 
            |   x  newVar, y  newVar, z  newVar, x*x + y*y <= 1, x*z >= 0 ]

You can attach some additional parameters that you are interested in to the output by using the at combinator. In this case you get back the value and parameters - otherwise just the maximum value will be returned. To run the optimization you need to choose a strategy like SimulatedAnnealing or GridSearch. For example the following code will optimize your objective using the SimulatedAnnealing strategy.

[...]
Just o <- objective `optimizedWithM` aSimulatedAnnealing (repeat 0.0)
print $ value o
print $ parameters o
[...]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published