How to use the zvt.settings.SAMPLE_STOCK_CODES function in zvt

To help you get started, we’ve selected a few zvt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zvtvz / zvt / tests / recorders / eastmoney / test_meta_recorder.py View on Github external
def test_meta_recorder():
    recorder = ChinaStockMetaRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / joinquant / test_quote_recorder.py View on Github external
def test_1wk_kdata_recorder():
    recorder = ChinaStockKdataRecorder(codes=SAMPLE_STOCK_CODES, sleeping_time=0, level=IntervalLevel.LEVEL_1WEEK,
                                       real_time=False)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / eastmoney / test_holder_recorder.py View on Github external
def test_top_ten_tradable_holder_recorder():
    recorder = TopTenTradableHolderRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / eastmoney / test_finance.py View on Github external
def test_income_statement_recorder():
    recorder = ChinaStockIncomeStatementRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / eastmoney / test_trading_recorder.py View on Github external
def test_manager_trading_recorder():
    recorder = ManagerTradingRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / eastmoney / test_dividend_financing_recorder.py View on Github external
def test_dividend_detail():
    recorder = DividendDetailRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / tests / recorders / eastmoney / test_finance.py View on Github external
def test_finance_factor_recorder():
    recorder = ChinaStockFinanceFactorRecorder(codes=SAMPLE_STOCK_CODES)
    try:
        recorder.run()
    except:
        assert False
github zvtvz / zvt / zvt / recorders / eastmoney / dividend_financing / rights_issue_detail_recorder.py View on Github external
df = get_rights_issue_detail(provider=self.provider, entity_id=item.entity_id,
                                         columns=[RightsIssueDetail.timestamp,
                                                  RightsIssueDetail.rights_raising_fund],
                                         start_timestamp=item.timestamp,
                                         end_timestamp="{}-12-31".format(item.timestamp.year))
            if pd_is_not_null(df):
                item.rights_raising_fund = df['rights_raising_fund'].sum()
                self.session.commit()

        super().on_finish()


if __name__ == '__main__':
    # init_log('rights_issue.log')

    recorder = RightsIssueDetailRecorder(codes=SAMPLE_STOCK_CODES)
    recorder.run()
github zvtvz / zvt / examples / factors / technical_selector.py View on Github external
start_timestamp=None, end_timestamp=None, long_threshold=0.8, short_threshold=0.2,
                 level=IntervalLevel.LEVEL_1DAY, provider='joinquant', block_selector=None) -> None:
        super().__init__(entity_ids, entity_type, exchanges, codes, the_timestamp, start_timestamp, end_timestamp,
                         long_threshold, short_threshold, level, provider, block_selector)

    def init_factors(self, entity_ids, entity_type, exchanges, codes, the_timestamp, start_timestamp, end_timestamp,
                     level):
        bull_factor = BullFactor(entity_ids=entity_ids, entity_type=entity_type, exchanges=exchanges,
                                 codes=codes, the_timestamp=the_timestamp, start_timestamp=start_timestamp,
                                 end_timestamp=end_timestamp, provider='joinquant', level=level)

        self.add_filter_factor(bull_factor)


if __name__ == '__main__':
    s = TechnicalSelector(codes=SAMPLE_STOCK_CODES, start_timestamp='2018-01-01', end_timestamp='2019-06-30')
    s.run()
    s.draw()
github zvtvz / zvt / zvt / trader / examples / __init__.py View on Github external
meta.metas['security_type'] = marshal_object_for_ui(cls.security_type)
        return meta


if __name__ == '__main__':
    # CoinTrader(start_timestamp='2019-06-03',
    #            end_timestamp='2019-06-22',
    #            level=TradingLevel.LEVEL_1MIN,
    #            security_list=['coin_binance_EOS/USDT'],
    #            real_time=False,
    #            kdata_use_begin_time=True).run()

    StockTrader(start_timestamp='2015-01-01',
                end_timestamp='2019-06-21',
                provider=Provider.NETEASE,
                codes=SAMPLE_STOCK_CODES,
                level=TradingLevel.LEVEL_1DAY).run()