-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
512 lines (512 loc) · 17.1 KB
/
.Rhistory
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
),
on = "TKR"
]
dx_condor_strike_diff
dx_condor_strike_diff[
][
.(strike_diff_inner_2 = strike_3 - strike_2,
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
),
by = TKR
]
dx_condor_strike_diff[
][
.(strike_diff_inner_2 = strike_3 - strike_2,
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
),
on = TKR
]
dx_condor_strike_diff[
][
.(strike_diff_inner_2 = strike_3 - strike_2,
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
),
on = "TKR"
]
dx_condor_strike_diff
[, .(strike_diff_inner_2 = strike_3 - strike_2,
dx_condor_strike_diff
[, .(strike_diff_inner_2 = strike_3 - strike_2,
dx_condor_strike_diff[, .(strike_diff_inner_2 = strike_3 - strike_2,
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
)
]
cbind(dx_condor_strike_diff, dx_condor_strike_diff[, .(strike_diff_inner_2 = strike_3 - strike_2,
strike_diff_c_2 = strike_4 - strike_2,
strike_diff_p_2 = strike_3 - strike_1
)
])
dx_condor_strike_diff
viewxl:::view_in_xl()
dx_condor_strike_diff <<- dx_condor_strike_diff
viewxl:::view_in_xl()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_strike_diff
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_strike_diff
viewxl:::view_in_xl()
dx_condor_strike_diff <<- dx_condor_strike_diff
viewxl:::view_in_xl()
dx_condor_strike_diff
[, `:=`
dx_condor_strike_diff_2 <-
as.data.table(
dcast(dx_condor_key,
TKR + CMPRICE ~ id_strike,
value.var = "strike",
sep = "_"
)
) %>%
# ------------------------------------------------------------------------------
colnames(dx_condor_strike_diff) <- c("TKR",
"CMPRICE",
"strike_1",
"strike_2",
"strike_3",
"strike_4"
)
dx_condor_strike_diff_2 <-
as.data.table(
dcast(dx_condor_key,
TKR + CMPRICE ~ id_strike,
value.var = "strike",
sep = "_"
)
) %>%
# ------------------------------------------------------------------------------
colnames(dx_condor_strike_diff) <- c("TKR",
"CMPRICE",
"strike_1",
"strike_2",
"strike_3",
"strike_4"
)
dx_condor_strike_diff_2 <-
as.data.table(
dcast(dx_condor_key,
TKR + CMPRICE ~ id_strike,
value.var = "strike",
sep = "_"
)
) %>%
# ------------------------------------------------------------------------------
colnames(dx_condor_strike_diff) <- c("TKR",
"CMPRICE",
"strike_1",
"strike_2",
"strike_3",
"strike_4"
)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_strike_diff
source("G:/My Drive/Documents/github/opis_volume/opis-volume.r")
source("C:/Users/falkg/OneDrive/Documents/github/vl/vl.r")
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
View(dx_condor_max_profit)
glimpse(dx_condor_max_profit)
View(dx_condor_pnl)
glimpse(dx_condor_pnl)
class(dx_condor_pnl)
View(dx_condor_profit_loss)
glimpse(dx_condor_profit_loss)
glimpse(dx_condor_roi)
View(dx_condor_roi)
glimpse(dx_condor_roi)
View(dx_condor_max_loss)
glimpse(dx_condor_max_loss)
View(dx_condor_pop)
glimpse(dx_condor_pop)
View(dx_condor_pnl)
S0 <- 90.49
vol <- 0.261
r <- 0.0549
T <- 37/252
P <- 7.67
# ------------------------------------------------------------------------------
# Create a data table with the inputs
dt <- data.table(S0 = S0, vol = vol, r = r, T = T)
# Calculate the annualized standard deviation
dt[, sigma := vol * sqrt(T)]
BE_lower <- 90 - P
BE_upper <- 95 + P
dt[, prob :=
stats::pnorm((log(BE_upper/S0) + (r + (sigma ^ 2)/2) * T) / sigma * base::sqrt(T)) -
stats::pnorm((log(BE_lower/S0) + (r + (sigma ^ 2)/2) * T) / sigma * base::sqrt(T))]
# Define the parameters
current_stock_price <- 90.49 # dx_condor_key[,2]
upper_call_strike <- 100 # dx_condor_key[id_strike == 4, 5]
lower_call_strike <- 90 # dx_condor_key[id_strike == 2, 5]
lower_put_strike <- 85 # dx_condor_key[id_strike == 1, 5]
upper_put_strike <- 95 # dx_condor_key[id_strike == 3, 5]
net_credit <- 7.35 # dx_condor_roi[, 2]
num_simulations <- 10000
implied_volatility <- 0.216 # dx_condor_pop[,4]/100
risk_free_rate <- 0.0543 # dx_int[,1]
days_to_expiration <- 37
# Calculate time to expiration in years
time_to_expiration <- days_to_expiration / 365 # dx_condor_pop[1,8]
# Generate random stock price scenarios
set.seed(123) # For reproducibility
z <- rnorm(num_simulations)
simulated_stock_prices <- current_stock_price * exp((risk_free_rate - 0.5 * implied_volatility^2) * time_to_expiration + implied_volatility * sqrt(time_to_expiration) * z)
# Calculate the payoff for each scenario
payoffs <- numeric(num_simulations)
for (i in 1:num_simulations) {
payoff <- ifelse(
simulated_stock_prices[i] < lower_put_strike,
net_credit - (lower_put_strike - simulated_stock_prices[i]),
ifelse(
simulated_stock_prices[i] >= lower_put_strike & simulated_stock_prices[i] <= upper_put_strike,
net_credit,
ifelse(
simulated_stock_prices[i] > upper_put_strike & simulated_stock_prices[i] < lower_call_strike,
0,
ifelse(
simulated_stock_prices[i] >= lower_call_strike & simulated_stock_prices[i] <= upper_call_strike,
net_credit,
net_credit - (simulated_stock_prices[i] - upper_call_strike)
)
payoffs[i] <- payoff
}
# Calculate the probability of profitability
probability_of_profit <- sum(payoffs > 0) / num_simulations
# Print the result
cat("Probability of Profitability:", probability_of_profit, "\n")
View(dx_condor_pop)
glimpse(dx_condor_pop)
View(dx_condor)
View(dx_condor_max_profit)
glimpse(dx_condor_key)
View(dx_condor_max_profit)
View(dx_condor_strike)
View(dx_condor_strike_disp)
View(dx_condor_key)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/lib/000_fun_archive.r", echo=TRUE)
dx_condor_max_profit
dx_condor_cost
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)
dx_condor_strike_diff <-
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)
dx_condor_strike_cost
glimpse(dx_condor_strike_cost)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_strike_price
dx_condor_max_profit
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)[, -c(2,5)]
dx_condor_cost
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_cost
dx_condor_max_profit
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)[, -c(2,5)]
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)[, -7]
dx_condor_strike_price <-
data.table::merge.data.table(
dcast(dx_condor_max_profit,
TKR + CMPRICE ~ id_strike,
value.var = "ASK",
sep = "_"),
dx_condor_cost[, max(diff), by = .(TKR)]
)[, -7]
colnames(dx_condor_strike_price) <- c("TKR",
"CMPRICE",
"strike_1",
"strike_2",
"strike_3",
"strike_4"
)
dx_condor_strike_price
View(dx_condor_strike_price)
glimpse(dx_condor_strike_price)
8.8 + 9.65 -4.75 - 4.95
dx_condor_cost
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_cost
dx_condor_strike_cost
dx_condor_strike_cost[dx_condor_date]
dx_condor_date
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_pnl
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
View(dx_condor_key)
View(dx_condor_strike_cost)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
traceback()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
g[[dx_condor_strike_cost]]
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
g[["dx_condor_strike_cost"]]
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR"))
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3030_pnl_processing)
fun_3030_pnl_processing
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR"))
map(., fun_3030_pnl_processing)
map(., fun_3030_pnl_processing())
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3030_pnl_processing(x))
condor <- g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3030_pnl_processing)
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3030_pnl_processing)
g[["dx_condor_strike_cost"]]
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3020_spread_processing)
glimpse(g[["dx_condor_strike_cost"]])
class(g[["dx_condor_strike_cost"]])
result <- mapply(
function(dx_condor_strike_cost, tkr) {
data <- split(dx_condor_strike_cost, dx_condor_strike_cost$TKR)
fun_3030_pnl_processing(data[[tkr]])
},
dx_condor_strike_cost = g[["dx_condor_strike_cost"]],
tkr = unique(g[["dx_condor_strike_cost"]]$TKR),
SIMPLIFY = FALSE
)
g[["dx_condor_strike_cost"]] %>%
split(., by = c("TKR")) %>%
map(., fun_3020_spread_processing)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
View(dx_stk)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
g[["dx_condor_strike_cost"]]
dx_condor_pnl
View(dx_condor_profit_loss)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
rlang::last_trace()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
mapply(fun_3030_pnl_processing, g{["dx_condor_strike_cost"]})
g{["dx_condor_strike_cost"]}
g{["dx_condor_strike_cost"]]
g[["dx_condor_strike_cost"]]
mapply(fun_3030_pnl_processing(), g[["dx_condor_strike_cost"]])
dx_condor_strike_cost
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
g[["dx_condor_strike_cost"]]
g[["dx_condor_strike_cost"]]) |>
g[["dx_condor_strike_cost"]] |>
split(., by = "TKR")
g[["dx_condor_strike_cost"]] %>%
split(., by = "TKR")
g[["dx_condor_strike_cost"]] %>%
split(., by = "TKR") %>% map(fun_3030_pnl_processing)
g[["dx_condor_strike_cost"]] %>%
split(., by = "TKR") %>% map(. fun_3030_pnl_processing)
g[["dx_condor_strike_cost"]] %>%
split(., by = "TKR")
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
str(days_to_expiration)
glimpse(days_to_expiration)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
rlang::last_trace()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_profit_loss
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
glimpse(stock_price)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
current_stock_price
glimpse(current_stock_price)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
date
glimpse(date)
class(date)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
pnl
dx_condor_profit_loss
j<- dx_condor_profit_loss
j
glimpse(dx_condor_strike_cost)
dx_condor_strike_cost[,"TKR"]
cbind(j, dx_condor_strike_cost[,"TKR"])
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
data.table::dcast(test,
... ~ Date,
fun.aggregate = sum,
value.var ="PnL")
View(dx_condor_date)
glimpse(dx_condor_date)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_pnl
test
data.table::dcast(test,
... ~ Date,
fun.aggregate = sum,
value.var ="PnL")
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_pnl
View(dx_condor_pnl)
g[["dx_condor_pnl"]]
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
dx_condor_pnl
g[["dx_condor_pnl"]]
rbind(dx_condor_pnl, g[["dx_condor_pnl"]])
View(dx_condor_pnl)
NROW(dx_condor_pnl)
NROW(g[["dx_condor_pnl"]])
view(g[["dx_condor_pnl"]])
print(g[["dx_condor_pnl"]])
NROW(g[["dx_condor_pnl"]])
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
rlang::last_trace()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
View(dx_condor_pnl)
g[["dx_condor_pnl"]]
g[["dx_condor_key"]]
g[["dx_condor_pnl"]]
test<-g[["dx_condor_pnl"]]
viewxl:::view_in_xl()
test
viewxl:::view_in_xl()
fwrite(test, test.csv)
fwrite(test, "test.csv")
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
days_to_expiry
str(days_to_expiry)
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
days_to_expiry
as.numeric(date - Sys.Date())
date
dx_condor_profit_loss$Date
dx_condor_profit_loss$Date[1,]
dx_condor_profit_loss$Date[1,1]
dx_condor_profit_loss$Date
dx_condor_date[, "diff"]
dx_condor_strike_cost
dx_condor_date
Date = rep(seq(Sys.Date(), Sys.Date() + days_to_expiration, by = "days"), each = 31)
Date = rep(seq(dx_condor_date[1,], dx_condor_date[1,] + days_to_expiration, by = "days"), each = 31)
dx_condor_date[1,]
dx_condor_date[1,1]
Date = rep(seq(dx_condor_date[1,1], dx_condor_date[1,1] + days_to_expiration, by = "days"), each = 31)
dx_condor_date[1,1]
Sys.Date()
glimpse(Sys.Date())
str(Sys.Date())
datapasta::dt_paste(dx_condor_date)
rep(seq(as.Date (test$run, format="%Y-%m-%d"))+ days_to_expiration, by = "days"), each = 31)
rep(seq(as.Date(test$run, format="%Y-%m-%d"))+ days_to_expiration, by = "days"), each = 31)
rep(seq(as.Date(test$run, format="%Y-%m-%d") + days_to_expiration, by = "days"), each = 31)
rep(seq(as.Date(dx_condor_date[1,1], format="%Y-%m-%d") + days_to_expiration, by = "days"), each = 31)
as.Date(dx_condor_date[1,1], format="%Y-%m-%d")
as.Date(dx_condor_date$run, format="%Y-%m-%d")
rep(seq(as.Date(dx_condor_date$run, format="%Y-%m-%d"), as.Date(dx_condor_date$run, format="%Y-%m-%d") + days_to_expiration, by = "days"), each = 31)
styler:::set_style_transformers()
source("C:/Users/falkg/OneDrive/Documents/GitHub/vl_archive/vl_archive.r", echo=TRUE)
g[["dx_condor_pnl"]]
library(quantmod)
library(RQuantLib)
library(data.table)
stock_price <- 88.65
strike_call_upper <- 95
strike_call_lower <- 85
strike_put_upper <- 90
strike_put_lower <- 80
days_to_expiration <- 38
historical_volatility <- 0.2
# Number of simulations
simulations <- 10^6
simulate_stock_price <- function(current_price, volatility, time_to_expiry) {
stock_prices <- numeric(length(time_to_expiry))
stock_prices[1] <- current_price
for (i in 2:length(time_to_expiry)) {
drift <- 0
random_shock <- rnorm(1, 0, sqrt(time_to_expiry[i] - time_to_expiry[i-1]))
stock_prices[i] <- stock_prices[i-1] * exp((drift - 0.5 * volatility^2) * (time_to_expiry[i] - time_to_expiry[i-1]) +
volatility * random_shock)
}
return(stock_prices)
}
# Time to expiry in years
time_to_expiry <- days_to_expiration / 365
# Simulate stock prices
stock_prices <- simulate_stock_price(stock_price, historical_volatility, c(0, time_to_expiry))
# Create a data.table to store simulation results
results <- data.table(stock_price = stock_prices)
# Calculate profit/loss for each simulation
results[, profit_loss := pmax(0, pmin(strike_call_upper - stock_price, stock_price - strike_call_lower,
stock_price - strike_put_upper, strike_put_lower - stock_price))]
# Calculate total profit/loss across all simulations
total_profit_loss <- sum(results$profit_loss)
# Calculate the number of profitable simulations
num_profitable <- sum(results$profit_loss > 0)
# Calculate the Probability of Profit
probability_of_profit <- num_profitable / simulations
probability_of_profit
S0 <- 90.49
vol <- 0.261
r <- 0.0549
T <- 37/252
P <- 7.67
# ------------------------------------------------------------------------------
# Create a data table with the inputs
dt <- data.table(S0 = S0, vol = vol, r = r, T = T)
# Calculate the annualized standard deviation
dt[, sigma := vol * sqrt(T)]
BE_lower <- 90 - P
BE_upper <- 95 + P
dt[, prob :=
stats::pnorm((log(BE_upper/S0) + (r + (sigma ^ 2)/2) * T) / sigma * base::sqrt(T)) -
stats::pnorm((log(BE_lower/S0) + (r + (sigma ^ 2)/2) * T) / sigma * base::sqrt(T))]
dt
S0 <- 90.49
vol <- 0.261
r <- 0.0549
T <- 37/252
P <- 7.67
str(s0)
str(S0)
str(vol)
str(r)
str(T)
str(P)
View(dx_condor_date)