I'm not saying that you don't, but before using software to calculate whatever you need, one should be sure to understand what is being priced and how to price it.
For a Libor 3M vs OIS swap, you need two curves: a 3M curve for the forward estimation of the 3M index and an OIS curve for the forward estimation of the overnight index and to discount the cashflows.
In QuantLib you can use either the ql.Swap or the ql.FloatFloatSwap classes.
For the ql.Swap
, the constructor would be:
ql.Swap(firstLeg, secondLeg)
and you can build the legs with ql.OvernightLeg
and ql.IborLeg
For the ql.FloatFloatSwap
the constructor would be:
ql.FloatFloatSwap(swapType, firstLegNotionals, secondLegNotionals, firstLegSchedule, firstLegIndex, firstLegDayCount, secondLegSchedule, secondLegIndex, secondLegDayCount, intermediateCapitalExchange=False, finalCapitalExchange=False, gearing1=[1.0], spread1=[0.0])
Neither of these objects have a method to determine the spread so I believe you will have to implement it yourself with a solver (QuantLib has several solvers). Solve which spread on the overnight index gives you an NPV of 0.
Same goes for the DV01, you will need to implement the logic yourself, with something like :
$$(MtM_{bump.up} - MtM_{bump.down}) / 2$$