| | |
| | | TSXV_index_turnover = round(TSXV_index_data[2]/100000000, 2) # 创业板指 当日当时成交额度 |
| | | TSXV_Yesterday_closing_index = round(TSXV_index_data[3], 2) # 深证指数 昨日收盘指数 |
| | | logger.info(f"创业板 指数:{TSXV_index} 昨日收盘指数:{TSXV_Yesterday_closing_index} 成交量------------{TSXV_index_volume}亿 手 成交额------------{TSXV_index_turnover}亿 元") |
| | | |
| | | # 调用涨幅公式计算对应的股票tick瞬时涨幅 |
| | | data_cache.Shanghai_tick_growth = basic_methods.tick_growth('000001', Shanghai_index) |
| | | data_cache.Shanghai_today_growth = basic_methods.intraday_growth(Shanghai_index, Shanghai_Yesterday_closing_index) |
| | |
| | | logger.info(f"创业板指 开盘涨幅 ==== {round(data_cache.TSXV_open_growth, 4)}%") |
| | | |
| | | |
| | | # 大盘指数趋势预期函数(用于对大盘开盘后短期内的趋势预测) |
| | | def index_trend_expectation(): |
| | | index_trend_expectation_score = 0 |
| | | # 判断三大指数开盘涨幅 预期 |
| | | if data_cache.Shanghai_open_growth > 0 and data_cache.Shenzhen_open_growth > 0 and data_cache.TSXV_open_growth > 0: |
| | | index_composite_open_increase = '三大指数:高开' |
| | | index_trend_expectation_score += 10 |
| | | if data_cache.Shanghai_open_growth >= 1 and data_cache.Shenzhen_open_growth >= 1 and data_cache.TSXV_open_growth >= 1: |
| | | index_composite_open_increase = '三大指数:高开1% 以上' |
| | | index_trend_expectation_score += 10 |
| | | elif data_cache.Shanghai_open_growth < 0 and data_cache.Shenzhen_open_growth < 0 and data_cache.TSXV_open_growth < 0: |
| | | index_composite_open_increase = '三大指数:低开' |
| | | index_trend_expectation_score -= 10 |
| | | if data_cache.Shanghai_open_growth <= 1 and data_cache.Shenzhen_open_growth <= 1 and data_cache.TSXV_open_growth <= 1: |
| | | index_composite_open_increase = '三大指数:低开1% 以下' |
| | | index_trend_expectation_score -= 10 |
| | | else: |
| | | index_composite_open_increase = '三大指数:涨跌不一' |
| | | logger.info(f"开盘指数开盘涨幅播报:{index_composite_open_increase}") |
| | | |
| | | # 判断三大指数开盘后当日涨幅 预期 |
| | | if data_cache.Shanghai_today_growth > data_cache.Shanghai_open_growth and data_cache.Shenzhen_today_growth > data_cache.Shenzhen_open_growth and data_cache.TSXV_today_growth > data_cache.TSXV_open_growth: |
| | | index_composite_today_increase = '三大指数:短期高走' |
| | | index_trend_expectation_score += 10 |
| | | elif data_cache.Shanghai_today_growth < data_cache.Shanghai_open_growth and data_cache.Shenzhen_today_growth < data_cache.Shenzhen_open_growth and data_cache.TSXV_today_growth < data_cache.TSXV_open_growth: |
| | | index_composite_today_increase = '三大指数:短期低走' |
| | | index_trend_expectation_score -= 10 |
| | | else: |
| | | index_composite_today_increase = '三大指数:短期走势不一' |
| | | logger.info(f"开盘指数开盘短期走势播报:{index_composite_today_increase}") |
| | | |
| | | # 判断三大指数开盘涨幅 预期 |
| | | if data_cache.Shanghai_tick_growth > 0 and data_cache.Shenzhen_tick_growth > 0 and data_cache.TSXV_tick_growth > 0: |
| | | index_composite_tick_increase = '三大指数:瞬时高走' |
| | | index_trend_expectation_score += 2 |
| | | if data_cache.Shanghai_tick_growth >= 0.01 and data_cache.Shenzhen_tick_growth >= 0.01 and data_cache.TSXV_tick_growth >= 0.01: |
| | | index_composite_tick_increase = '三大指数:高走0.01% 以上' |
| | | index_trend_expectation_score += 4 |
| | | elif data_cache.Shanghai_tick_growth < 0 and data_cache.Shenzhen_tick_growth < 0 and data_cache.TSXV_tick_growth < 0: |
| | | index_composite_tick_increase = '三大指数:瞬时低走' |
| | | index_trend_expectation_score -= 2 |
| | | if data_cache.Shanghai_tick_growth <= 0.01 and data_cache.Shenzhen_tick_growth <= 0.01 and data_cache.TSXV_tick_growth <= 0.01: |
| | | index_composite_tick_increase = '三大指数:低走0.01% 以下' |
| | | index_trend_expectation_score -= 4 |
| | | else: |
| | | index_composite_tick_increase = '三大指数:涨跌不一' |
| | | logger.info(f"开盘指数开盘瞬时走势播报:{index_composite_tick_increase}") |
| | | return index_trend_expectation_score |
| | | |
| | | |
| | | |