Originally posted by ozknows
View Post
double GetDiff(double price, double size)
{
var liability = Math.Round(size * (1 - price), 2, MidpointRounding.AwayFromZero);
var actualProfitRatio = size / liability;
var fairProfitRatio = 1 / (1 - price);
return Math.Round(actualProfitRatio / fairProfitRatio - 1, 4);
}
Currently allowed -0.20 <= diff < 0.25


Comment