Skip to Content
Python算法交易
book

Python算法交易

by Yves Hilpisch
November 2022
Intermediate to advanced
392 pages
10h 8m
Chinese
China Electric Power Press Ltd.
Content preview from Python算法交易
自动化交易操作
|
325
以根据自己的需要调整日志记录和流数据。
注
5
此外,可以对交易脚本和整个逻辑进
行调整,以包括诸如止损或以编程方式获取获利目标之类的功能。
货币交易和
/
或差价合约与许多金融风险相关。为此类工具实施算法交
易策略会自动导致许多其他风险。其中包括交易和
/
或执行逻辑中的缺
陷。但是也存在技术风险,例如与网络套接字通信相关的问题,延迟的
数据获取甚至在部署期间丢失报价数据。因此,在以自动化方式部署交
易策略之前,应确保所有相关的市场,执行,操作,技术和其他风险都
已被识别、评估和适当解决了。本章中提供的代码仅用于技术说明目的。
10.6
可视化分步概览
最后一节以截屏的方式提供了逐步的概述。前面的部分基于
FXCM
交易平台,而可
视化概述则基于
Oanda
交易平台。
10.6.1
配置
Oanda
账号
第一步是在
Oanda
(或可以实现目的的任何其他交易平台)上建立一个账户,并根
据凯利准则为该账户设置正确的杠杆比率,如图
10-8
所示。
10.6.2
设置硬件
第二步是创建一个
DigitalOcean
的
droplet
,如图
10-9
所示。
10.6.3
设置
Python
环境
第三步是在虚拟机上安装所有软件(见图
10-10
),以建立基础设施。一切正常后,
你可以创建一个新的
Jupyter Notebook
并启动你的交互式
Python
会话(见图
10-11
)。
10.6.4
上传代码
第四步是上传
Python
脚本,以进行自动交易和实时监控,如图
10-12
所示。带有账
户凭证的配置文件也需要上传。
注 5: 请注意,在两个脚本中实现的套接字通信未加密,而是通过 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
图解大模型 : 生成式AI 原理与实战

图解大模型 : 生成式AI 原理与实战

Jay Alammar, Maarten Grootendorst

Publisher Resources

ISBN: 9787519869694