20201215-追踪止盈单需求设计文档
<h1><center>追踪止盈单需求设计文档_v1.0</center></h1>
<h2>修订记录</h2>
<table>
<thead>
<tr>
<th style="text-align: center;">版本号</th>
<th style="text-align: center;">修订人</th>
<th style="text-align: left;"><div style="width: 85px;">修订日期</div></th>
<th style="text-align: left;"><div style="width: 380px;">修订内容</div></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">V1.0</td>
<td style="text-align: center;">Challenger</td>
<td style="text-align: left;">2020-12-15</td>
<td style="text-align: left;">init</td>
</tr>
</tbody>
</table>
<p>[TOC]</p>
<h2>1.引言</h2>
<h3>1.1 编写目的</h3>
<p> 为了解决日内捞鱼建仓或补仓后,遇到股价快速上涨,且超过1%,或者持仓过夜,次日股价出现跳涨问题,提高日内捞鱼被动止盈的收益。在价格上涨达到1%时,触发跟踪止损单,如果价格不回头,继续上涨,止盈价跟着上涨,当股价回调0.05%或0.01%)时止盈。
本文档给出规则引擎V3设计说明,包括最终实现的功能需求、技术架构方案、业务时序图、数据库模型设计、相关页面设计。
产品研发过程以本文档为基础,技术代码依照本文档方案执行。如过程中涉及需求、架构、方案设计调整都需要更新到本文档中。</p>
<h3>1.2 需求</h3>
<p><strong>需求说明:</strong>
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/c9c99219a9f40d80fdc19afe46c2ba12" alt="" /></p>
<h3>1.3 术语</h3>
<table>
<thead>
<tr>
<th style="text-align: center;">术语</th>
<th style="text-align: center;">术语定义</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">二方</td>
<td style="text-align: center;">本系统模块之外的所属本企业的内部系统模块,如:规则引擎、指标平台...</td>
</tr>
<tr>
<td style="text-align: center;">三方</td>
<td style="text-align: center;">除本企业内部所有系统之外的外部服务商,如:IB、FMP、英为财情...</td>
</tr>
<tr>
<td style="text-align: center;">交易引擎</td>
<td style="text-align: center;">澈悟量化交易平台</td>
</tr>
<tr>
<td style="text-align: center;"></td>
<td style="text-align: center;"> </td>
</tr>
</tbody>
</table>
<h3>1.4 参考资料</h3>
<p>《重构:改善既有代码的设计》</p>
<h2>2.整体设计</h2>
<h3>2.1 整体架构图</h3>
<p><strong>业务逻辑架构图</strong>
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/690ff7b2bd1fe832c01f06d18be36eee" alt="" /></p>
<p><strong>运维部署架构图</strong>
暂无</p>
<p><strong>技术架构图</strong>
暂无</p>
<h3>2.2 关键子功能模块</h3>
<p>交易引擎算法订单支持;
回测支持算法订单;</p>
<h3>2.3 关键业务时序图</h3>
<p>暂无</p>
<h2>3. 接口设计</h2>
<h3>3.1 三方接口</h3>
<p>暂无</p>
<h3>3.2 二方接口</h3>
<p>暂无</p>
<h2>4. 子模块设计</h2>
<h3>4.1 交易引擎</h3>
<h4>4.1.1 模块需求说明</h4>
<pre><code>交易引擎</code></pre>
<h4>4.1.1 架构设计图</h4>
<p>暂无</p>
<h4>4.1.2 关键业务时序图</h4>
<p>暂无</p>
<h4>4.1.3 业务功能交互</h4>
<p>暂无</p>
<h4>4.1.4 数据库结构设计</h4>
<p><strong>数据库结果及ER关系图</strong>
暂无</p>
<h4>4.1.5 结构设计</h4>
<h3>4.2 回测系统</h3>
<h4>4.2.1 模块需求说明</h4>
<pre><code>回测系统</code></pre>
<h4>4.2.1 架构设计图</h4>
<p>暂无</p>
<h4>4.2.2 关键业务时序图</h4>
<p>暂无</p>
<h4>4.2.3 业务功能交互</h4>
<p>暂无</p>
<h4>4.2.4 数据库结构设计</h4>
<p><strong>数据库结果及ER关系图</strong>
暂无</p>
<h4>4.2.5 结构设计</h4>
<h2>5. 性能</h2>
<h3>运行性能评估</h3>
<ol>
<li>持续下跌会出现补n,一直未上涨会存在多个订单待下跟踪止盈单;</li>
<li>最新价格在回测时,需要按秒或按段停表;</li>
</ol>
<h2>6. 安全</h2>
<h3>操作安全</h3>