Cross-Sectional Volatiltiy as a Regime Predictor

Hello Everyone,
I have been having a great time learning how to use Quantopian, but I have gotten stuck and I was wondering if you had any suggestions. I have two factors A & B and I want to use the historical rolling average cross-sectional volatility of each factor as new macro factors to help determine how much weight that I should put on each factor. Thanks.