original_docstring: Computes the financial beta between a stock and a benchmark.
docstring: Computes the financial beta between a stock and a benchmark.
docstring_tokens: Computes the financial beta between a stock and a benchmark .
code: def historical_beta(values, benchmark):
      'Computes the financial beta between a stock and a benchmark.'
  
      cov = np.cov(np.vstack((values, benchmark)))
  
      return (cov / benchmark.var())[0, 1]
code_tokens: def historical_beta ( values , benchmark ) : cov = np . cov ( np . vstack ( ( values , benchmark ) ) ) return ( cov / benchmark . var ( ) ) [ 0 , 1 ]
short_docstring: Computes the financial beta between a stock and a benchmark.
short_docstring_tokens: Computes the financial beta between a stock and a benchmark .
comment: 'Computes the financial beta between a stock and a benchmark.'