# Bootstrapping overnight SOFR rates from futures

I'm struggling with the best way to approach bootstrapping out a SOFR curve using SOFR 1m and 3m futures. Theoretically, unless I'm wrong, there should be a way to price out the expected overnight rate daily for the next year or so using both futures.

The 1m future settles into the arithmetic average of the overnight rate for each day in the given month, with rates on days on which the market is closed being the rate on the last market day. So that's easy, you can basically just find the average rate needed for the month, and create a curve. You can use futures of months without Fed action to back out Fed probabilities and bootstrap that way, or you can use the FF futures implied Fed action.

But then you have the 3m futures that use the same underlying overnight rate but are calculated using a combination of arithmetic and geometric mean where rates are weighted by their effective days and then multiplied (will provide example below). My question is how to best reconcile these two prices given that they have the same underlying but tons of possible permutations?

Example for a 7 day period (Mon-Sun):

Overnight rate is 5 , 5.02, 5.04, 5.02, 5 , 5 , 5 (Sat and Sun carried forward from Friday)

1m futs calculation would be (5+5.02+5.04+5.02+5+5+5)/7 or 5.0114

3m futs calculation would be ( ( ( 1 +( .05 x 1 )/ 360 ) + ( 1 +( .0502 x 1 )/ 360 ) + ( 1 +( .0504 x 1 )/ 360 ) + ( 1 +( .0502 x 1 )/ 360 ) + ( 1 +( .05 x 3)/ 360 ) ) - 1 ) x (360 / 7) = 5.0132

Essentially it boils down to a system of equations where:

1m futs rate: ( ( r1 x d1 ) + ( r2 x d2 ) + ... + ( rn x dn ) ) / ( d1 + d2 + ... + d3 )

3m futs rate: ( ( ( 1 + r1 x d1 / 360 ) * ( 1 + r2 x d2 / 360 ) * ... * ( 1 + rn x dn / 360 ) ) - 1 ) * ( 360 / ( d1 + d2 + ... + dn) )

To make it slightly more complicated, the 3m futures reference period starts in the middle of one month and ends in the middle of the month three months later (ie. mid June to mid Sep).

Would appreciate insight into whether brute force is the only way to solve this (if that's even possible) or if there's some matrix type math that can be applied. Thanks!