13.08.2022 Views

advanced-algorithmic-trading

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

55

plt.show()

We can see the sampled range of posterior regression lines in Figure 5.3:

Figure 5.3: Using PyMC3 GLM module to show a set of sampled posterior regression lines

The main takeaway here is that there is uncertainty in the location of the regression line as

sampled by the Bayesian model. However, it can be seen that the range is relatively narrow and

that the set of samples is not too dissimilar to the "true" regression line itself.

5.4 Bibliographic Note

An introduction to frequentist linear regression can be found in James et al[59]. A more technical

overview, including subset selection methods, can be found in Hastie et al[51]. Gelman et al[47]

discuss Bayesian linear models in depth at a reasonably technical level.

This chapter is influenced from previous blog posts by Thomas Wiecki[102] including his

discussion of Bayesian GLMs[99, 101] as well as Jonathan Sedar with his posts on Bayesian

Inference with PyMC3[90].

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!