library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
# Define the coordinates of the points
point1 <- c(7396, 10320, 14400)
point2 <- c(11815.7, 11815.7, 11815.7)

M <- data.frame(x=c(point1[1], point2[1]),
                y=c(point1[2], point2[2]),
                z=c(point1[3], point2[3]),
                label = c("Stock Only", "Risk-free Only"))


plot_ly(data = M, x = ~x, y = ~y, z = ~z, text = ~label, type = "scatter3d", mode = "markers") %>%
  
  layout(scene = list(xaxis = list(title = "V_tilde_dd(2)"),
                      yaxis = list(title = "V_tilde_ud(2)"),
                      zaxis = list(title = "V_tilde_uu(2)")))