diff --git a/README.md b/README.md index d64b27e..4b2cb90 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ `overround-methods` === -A collection of overround application methods. \ No newline at end of file +[![Build Status](https://img.shields.io/github/actions/workflow/status/kindredgroup/overround-methods/master.yml?branch=master&style=flat-square&logo=github)](https://github.com/kindredgroup/overround-methods/actions/workflows/dotnet.yml) + +A collection of overround application methods. + +# Examples +```csharp +using Overround; + +double[] fairPrices = [1 / 0.1, 1 / 0.2, 1 / 0.3, 1 / 0.4]; +double fairBooksum = Booksum.FromPrices(fairPrices); +Console.WriteLine("fair prices: [{0}]", string.Join(", ", fairPrices)); +Console.WriteLine("fair booksum: {0}", fairBooksum); + +double idealOverround = 1.15; +Console.WriteLine("ideal overround: {0}", idealOverround); + +IOverroundMethod[] methods = [new Multiplicative(), new Additive(), new Power(), new OddsRatio()]; +foreach (var method in methods) +{ + double[] odds = method.Apply(fairPrices, idealOverround); + Console.WriteLine(""); + Console.WriteLine("method: {0}", method.GetType().Name); + Console.WriteLine("odds: [{0}]", string.Join(", ", odds)); +} +``` \ No newline at end of file