-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
27 lines (21 loc) · 714 Bytes
/
script.py
File metadata and controls
27 lines (21 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
"""script.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1DkTHo36fRRUHGtbDehNiPTTtK7HgVkut
"""
import numpy as np
expirys = np.linspace(5, 5, num = 1)
strikes = np.linspace(80, 100 , num = 5)
spots = np.linspace(80, 100 , num = 5)
vols = np.linspace(0.5, 0.5 , num = 1)
rs = np.linspace(0.05,0.3 , num = 3)
ds = np.linspace(0.05,0.3 , num = 3)
with open('input.csv', 'w', encoding='UTF8') as f:
for expiry in expirys:
for strike in strikes:
for spot in spots:
for vol in vols:
for r in rs:
for d in ds:
f.write(f"{expiry},{strike},{spot},{vol},{r},{d}\n")