def call_kurtosis(self, other_args: List[str]): """Process kurtosis command""" parser = argparse.ArgumentParser( add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter, prog="kurtosis", description=""" Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. Like skewness, kurtosis describes the shape of a probability distribution and there are different ways of quantifying it for a theoretical distribution and corresponding ways of estimating it from a sample from a population. Different measures of kurtosis may have different interpretations. """, ) parser.add_argument( "-w", "--window", action="store", dest="n_length", type=check_positive, default=14, help="length", ) ns_parser = parse_known_args_and_warn( parser, other_args, export_allowed=EXPORT_ONLY_RAW_DATA_ALLOWED) if ns_parser: rolling_view.display_kurtosis( name=self.ticker, df=self.df, target=self.target, window=ns_parser.n_length, export=ns_parser.export, )
def call_kurtosis(self, other_args: List[str]): """Process kurtosis command""" parser = argparse.ArgumentParser( add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter, prog="kurtosis", description=""" Kurtosis is a measure of the "tailedness" of the probability distribution of a real-valued random variable. Like skewness, kurtosis describes the shape of a probability distribution and there are different ways of quantifying it for a theoretical distribution and corresponding ways of estimating it from a sample from a population. Different measures of kurtosis may have different interpretations. """, ) parser.add_argument( "-l", "--length", action="store", dest="n_length", type=check_positive, default=14, help="length", ) parser.add_argument( "--export", choices=["csv", "json", "xlsx"], default="", type=str, dest="export", help="Export dfframe df to csv,json,xlsx file", ) try: ns_parser = parse_known_args_and_warn(parser, other_args) if not ns_parser: return rolling_view.display_kurtosis( name=self.ticker, df=self.stock, target=self.target, length=ns_parser.n_length, export=ns_parser.export, ) except Exception as e: print(e, "\n")