# Solving BSDE in R

I was wondering how to implement a BSDE approximation in R. For example, if I have the toy BSDE $$dX_t = \mu dt + \sigma dW_t ; X_T\sim N(\mu_1,\sigma_1),$$ for fixed real numbers $$\mu,\mu_1,\sigma,\sigma_1$$, how can I write simulate this in R?

• Thanks, but that is an answer to simulating SDEs not BSDEs (they generally require a totally different approach from what I'm reading). – AIM_BLB Dec 13 '18 at 19:26
• Sorry you are right, BSDE much more difficult than SDE, I will delete my comment – Alex C Dec 13 '18 at 20:12
• @AlexC no worries honestly, I appreciate the input :D – AIM_BLB Dec 13 '18 at 20:40
• After looking around I am not convinced your example equation is a properly posed BSDE. A BSDE will have two functions to be determined $X_t$ and $Z_t$, the "output" and "control" function, and you only have $X_t$. – Alex C Dec 14 '18 at 16:02