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算法交易
256
|
第
8
章
将列名附加到列表对象上,方便以后进行打印。
绘制金融工具和策略的累积表现。
图 8-7:EUR_USD 的不同动量策略的表现(分钟柱线)
8.3.3
杠杆和保证金因素
一般来讲,当你以
100
美元的价格购买股票时,损益(
P
&
L
)计算很简单:如果
股价上涨
1
美元,你将获得
1
美元(未兑现利润);如果股价下跌
1
美元,你将损
失
1
美元(未兑现损失)。如果你购买
10
股,则将结果乘以
10
即可。
在
Oanda
平台上交易差价合约则涉及杠杆和保证金。这极大地影响了损益计算。
有有
关此主题的介绍和概述,请参阅
Oanda fxTrade
保证金规则(
https://oreil.
ly/8I5Eg
)。下面一个简单的例子可以介绍在这种情况下的主要方面。
例如一个基于欧元的算法交易者,希望在
Oanda
平台上交易
EUR_USD
,并以
1.1
的要价做多
10000
欧元。在没有杠杆和保证金的情况下,交易者(或
Python
程序)
使用
Oanda
进行
CFD
交易
|
257
购买
10000
单位的差价合约。
注
3
如果金融工具的价格(汇率)升至
1.105
(作为买
入价和要价之间的中点价),则绝对利润为
10000
×
0.005 = 50
或
0.5%
。
如果有杠杆和保证金,那么会有什么影响呢?假设算法交易者选择的杠杆比率为
20:1
,这意味着 ...
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