I have created a piecewise linear zero curve using quantlib (c++). It's a NACA, modifiedFollowing swap curve. When I extract the zero rates on the pillar dates the rates line up with what is expected but when I call zero rates in between I get a slightly different linear interpolated rate to what I'm expecting. The discount factors are also different but I read quantlib uses NACC. My question is why are the zero rates different, and for the discount rates which method would I override to use annual compounding for the discount factors? Thanks.
To get a zero rate between pillar dates (benchmark instrument dates) linear interpolation should be used. Using Excel to do this manually I get a different zero rate to quantlib (not far out but starts to differ after the 5th decimal place which has an impact on swap pricing). So either the time period to the interpolated point should be different or quantlib isn't using linear interpolation.
Found the answer eventually by manual calculation.
Even if the zero curve is an annual 365F compounded curve, Quantlib works in continuous terms. Therefore the dates between the pillar dates use linear interpolation on continuous zero rates and not compounded zero rates. It does calculate the implied compounded zero rate but in a number of steps:
Linear interpolate on continuous zeros
Calculate the discount factor (continuous i.e. exp(-rt))
Pass compound value (1/df) to implied rate method which converts to annual 365F compounded.
It gives a slightly different answer to when you work with compound zeros only.