Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.21 KB

README.md

File metadata and controls

29 lines (22 loc) · 1.21 KB

ETF Portfolio Rebalancing

Build status master Build status dev NuGet version

Description

Collection of portfolio rebalance algorithms.

Basis usage:

Fast and intelligent algorithm

var portfolio = new List<ETFItem>
{
    new ETFItem("ISIN_1", 0, 10.0m, 0.2m),
    new ETFItem("ISIN_2", 0, 20.0m, 0.8m),
};

var input = new RebalanceInput(1000, 2, portfolio);
var algo = new FastButIntelligentAlgo();
var result = algo.Rebalance(input);
foreach(var order in result.Orders)
{
   Console.WriteLine($"You should {order.OrderAmount}x {order.ISIN} for {order.CurrentPrice*order.OrderAmount:C}");
}