Type/to search

吕神简易波动率策略Pine语言版本

Cryptocurrency
Created: 2022-05-08 15:41:01
Last modified: 4 years ago
11
Follow
649
Followers

来自于两年前用户公开的一个简单的波动率策略

https://www.fmz.com/strategy/200131

无意翻到, 用PINE重写了下代码量减少了 90% 给量化的朋友们学习参考

img

Source
Pine
/*backtest
start: 2021-05-16 00:00:00
end: 2022-05-15 23:59:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Bitfinex","currency":"BTC_USD"}]
*/

N = input(50, '指数计算周期')

vix = math.log(close) / math.log(close[N-1]) - 1
vix_ma = ta.sma(vix, N)
Strategy parameters
Strategy parameters
指数计算周期
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)