Ejemplo n.º 1
0
    def call_hotpenny(self, other_args: List[str]):
        """Process hotpenny command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            formatter_class=argparse.ArgumentDefaultsHelpFormatter,
            prog="hotpenny",
            description="""
                This site provides a list of todays most active and hottest penny stocks. While not for everyone, penny
                stocks can be exciting and rewarding investments in many ways. With penny stocks, you can get more bang
                for the buck. You can turn a few hundred dollars into thousands, just by getting in on the right penny
                stock at the right time. Penny stocks are increasing in popularity. More and more investors of all age
                groups and skill levels are getting involved, and the dollar amounts they are putting into these
                speculative investments are representing a bigger portion of their portfolios.
                [Source: www.pennystockflow.com]
            """,
        )
        parser.add_argument(
            "-l",
            "--limit",
            action="store",
            dest="limit",
            type=check_positive,
            default=5,
            help="limit of stocks to display",
        )
        if other_args and "-" not in other_args[0][0]:
            other_args.insert(0, "-l")

        ns_parser = parse_known_args_and_warn(parser, other_args,
                                              EXPORT_ONLY_RAW_DATA_ALLOWED)
        if ns_parser:
            shortinterest_view.hot_penny_stocks(
                num=ns_parser.limit,
                export=ns_parser.export,
            )
Ejemplo n.º 2
0
    def call_hotpenny(self, other_args: List[str]):
        """Process hotpenny command"""
        parser = argparse.ArgumentParser(
            add_help=False,
            formatter_class=argparse.ArgumentDefaultsHelpFormatter,
            prog="hotpenny",
            description="""
                This site provides a list of todays most active and hottest penny stocks. While not for everyone, penny
                stocks can be exciting and rewarding investments in many ways. With penny stocks, you can get more bang
                for the buck. You can turn a few hundred dollars into thousands, just by getting in on the right penny
                stock at the right time. Penny stocks are increasing in popularity. More and more investors of all age
                groups and skill levels are getting involved, and the dollar amounts they are putting into these
                speculative investments are representing a bigger portion of their portfolios.
                [Source: www.pennystockflow.com]
            """,
        )
        parser.add_argument(
            "-n",
            "--num",
            action="store",
            dest="n_num",
            type=check_positive,
            default=10,
            help="Number of top stocks to print.",
        )
        parser.add_argument(
            "--export",
            choices=["csv", "json", "xlsx"],
            default="",
            type=str,
            dest="export",
            help="Export dataframe data to csv,json,xlsx file",
        )
        try:
            ns_parser = parse_known_args_and_warn(parser, other_args)
            if not ns_parser:
                return

            shortinterest_view.hot_penny_stocks(
                num=ns_parser.n_num,
                export=ns_parser.export,
            )

        except Exception as e:
            print(e, "\n")
Ejemplo n.º 3
0
def test_hot_penny_stocks():
    shortinterest_view.hot_penny_stocks(num=2, export="")