<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>IC on wubigo</title>
    <link>https://wubigo.com/tags/ic/</link>
    <description>Recent content in IC on wubigo</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 07 Apr 2025 11:43:40 +0800</lastBuildDate>
    
	<atom:link href="https://wubigo.com/tags/ic/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Stock Future Simulate Trading</title>
      <link>https://wubigo.com/post/stock-future-simulate-trading/</link>
      <pubDate>Mon, 07 Apr 2025 11:43:40 +0800</pubDate>
      
      <guid>https://wubigo.com/post/stock-future-simulate-trading/</guid>
      <description>要在 Python 中进行 A股股指期货的模拟交易，最标准且专业的方式是使用 CTP (Comprehensive Transaction Platform) 接口。CTP 是国内期货公司普遍支持的交易系统。
以下是实现 Python 模拟下单的三个主要途径，按从易到难排序：
1. 使用开源量化交易框架：vn.py（最推荐） vn.py 是国内最流行的 Python 开源量化交易系统，它已经封装好了 CTP 接口，提供了完整的图形界面和脚本接口。
 官方支持： 提供专用的 SimNow（中继交易平台）模拟环境对接。 如何操作：  前往 SimNow官网 注册模拟账号（获取投资人账号、密码、BrokerID）。 安装 vn.py：pip install vnpy。 通过 vnpy_ctp 模块连接 SimNow 环境。 调用 send_order 函数即可下单。   2. 使用原生 CTP 接口的 Python 封装（适合进阶） 如果你不想使用庞大的框架，可以只安装 CTP 的 Python 封装库（如 tqsdk 或 open_ctp）。
天勤量化 (TqSdk) 是目前上手最快的 Python 期货库，它的模拟交易环境（TqSim）非常稳定。
示例代码：使用 TqSdk 进行模拟下单 from tqsdk import TqApi, TqAuth, TqAccount # 1.</description>
    </item>
    
  </channel>
</rss>