code: def get_annaul_return_from_return_series(r, method="ci"):
      """Risk Analysis from daily return series
  
      Parameters
      ----------
      r : pandas.Series
          daily return series
      method : str
          interest calculation method, ci(compound interest)/si(simple interest)
      """
      mean = r.mean()
      annual = (1 + mean) ** 250 - 1 if method == "ci" else mean * 250
  
      return annual
  
imports: from __future__ import division
  from __future__ import print_function
  import numpy
  import pandas
  from scipy.stats import spearmanr, pearsonr
  from ..data import D
  from collections import OrderedDict
label_desc: Use image node_id 6 for calling a global function with example usage: get_annaul_return_from_return_series(r, method) and returns: annual