I have each of the F's(JanF1, FebF1 ...etc.), taken form the tables above but I need to calculate the value of X1, X2, X3 and S(0),S(1) and S(2) such that we Minimise the Variance of S(0), S(1) and S(2).

In summary calculate the three x's such that we minimise Variance(S(0), S(1), S(3)).

There are constraints on the unkonwn X's:

All 3 x's must be between 0 and 1.
The 3 x's must sum to a total of 1. i.e. x1 + x2 + x3 =1.

I know this is a simple problem for the excel solver(I can mail you the spreadsheet with the problem worked out) but I need to produce an algorithm to solve it as I intend to code a solver of my own.