I am trying to calculate the interaction of oil prices (independent variable) with stock returns (dependent variable) of oil companies over the last decade. I understand that with panel data regression I can control for market risks and firm risks. I'd be interested to know if someone has built a workflow for doing panel data regression or a workflow to calculate sensitivity on firm level to a macro factor while controlling for market and entity effects. Open to other suggestions. Thank you!