Skip to content

Instantly share code, notes, and snippets.

@zachlim98
Created February 11, 2021 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachlim98/85af79cfd383a705a37a19bc98e5ba16 to your computer and use it in GitHub Desktop.
Save zachlim98/85af79cfd383a705a37a19bc98e5ba16 to your computer and use it in GitHub Desktop.
plottest <- as.data.frame(putPrice) %>%
mutate(ix = 1:nrow(gbm)) %>%
pivot_longer(-ix, names_to = 'sim', values_to = 'price')
plottest %>%
ggplot(aes(x=ix, y=price, color=sim)) +
geom_line() +
labs(x="Days", y="Price", title="1000 Simulations of AAPL 122.5 Put Price") +
coord_cartesian(
xlim = NULL,
ylim = c(0,25),
expand = TRUE,
default = FALSE,
clip = "on"
) +
theme(legend.position = 'none')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment