We can integrate Cython and NumPy code in the same way we can integrate Cython and Python code. Let's go through an example that analyzes the ratio of up days (days on which a stock closes higher than the previous day) for a stock. We will apply the formula for binomial proportion confidence. You can refer to http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval for more information. The following formula indicates how significant the ratio is:

In the formula, **p** is the probability and **n** is the number of observations.

This section describes how to use Cython with NumPy, with the following steps: ...

Start Free Trial

No credit card required