def plot_stoch_vol(data, trace=None, ax=None):
if trace is None:<EOL><INDENT>trace = model_stoch_vol(data)<EOL><DEDENT>if ax is None:<EOL><INDENT>fig, ax = plt.subplots(figsize=(<NUM_LIT:15>, <NUM_LIT:8>))<EOL><DEDENT>data.abs().plot(ax=ax)<EOL>ax.plot(data.index, np.exp(trace['<STR_LIT:s>', ::<NUM_LIT:30>].T), '<STR_LIT:r>', alpha=<NUM_LIT>)<EOL>ax.set(title='<STR_LIT>', xlabel='<STR_LIT>', ylabel='<STR_LIT>')<EOL>ax.legend(['<STR_LIT>', '<STR_LIT>'],<EOL>frameon=True, framealpha=<NUM_LIT:0.5>)<EOL>return ax<EOL>
Generate plot for stochastic volatility model.

Parameters
----------
data : pandas.Series
    Returns to model.
trace : pymc3.sampling.BaseTrace object, optional
    trace as returned by model_stoch_vol
    If not passed, sample from model.
ax : matplotlib.axes object, optional
    Plot into axes object

Returns
-------
ax object

See Also
--------
model_stoch_vol : run stochastic volatility model