-
Notifications
You must be signed in to change notification settings - Fork 0
/
greeks.rmd
60 lines (54 loc) · 1.74 KB
/
greeks.rmd
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
---
title: "Greeks for Uniswap V3"
abstract: ""
pdf_document: null
geometry: "margin=25mm"
output:
pdf_document:
toc: false
number_sections: true
toc_depth: 2
keep_md: false
keep_tex: false
template: NULL
html_document: default
tables: yes
latex_engine: pdflatex
header-includes:
- \usepackage{multirow}
- \usepackage{amsmath}
- \usepackage{mathtools,mathptmx}
knit: (function(inputFile, encoding) {
rmarkdown::render(inputFile, encoding = "UTF-8", output_dir = "pdf") })
---
```{r, echo=FALSE, warning=FALSE, results='asis'}
source(paste(path, "/greeks.r", sep=""))
data <- get_chunks(0.5)
data_frame <-data.frame(data)
data_optimal_liq <- get_chunks_liq(0.5)
data_frame %>%
kbl(booktabs = T,
align = "c",
longtable = F,
escape = FALSE,
caption = "Greeks for Uniswap V3 LP positions.\\label{tab:table1}",
col.names = c("$\\sigma$", "Pa", "Pb", "Range factor", "$\\delta$", "$\\gamma$")
) %>%
kable_styling(font_size = 9, latex_options = c("hold_position", "repeat_header")) %>%
column_spec(1, bold=F) %>%
collapse_rows(columns = 1, latex_hline = "major", valign = "middle") %>%
print()
data_optimal_liq %>%
kbl(booktabs = T,
align = "c",
longtable = F,
escape = FALSE,
caption = "Choosing optimal Uniswap V3 LP positions to achieve a target delta exposure.\\label{tab:table2}",
col.names = c("Target $\\delta$", "$\\sigma$", "Price", "Time (Days)", "Pa", "Pb")
) %>%
kable_styling(font_size = 9, latex_options = c("hold_position", "repeat_header")) %>%
column_spec(1, bold=F) %>%
row_spec(c(5,10), extra_latex_after = '\\cline{2-6}') %>%
collapse_rows(columns = c(1, 2, 4), latex_hline = "major", valign = "middle") %>%
print()
```