Can i use cvxpy for monte carlo simulation or i have to use cvxstoc?

Can i use cvxpy for monte carlo simulation or i have to use cvxstoc?

Hi Jane,



You can use both cvxpy and cvxstoc for Monte Carlo simulations. If you have a problem that can be modelled as a convex optimisation problem with uncertain parameters, then you can use cvxpy and add Monte Carlo sampling to estimate the expected value of the objective function.

On the other hand, if your problem has a structure that fits the framework of stochastic programming, then you can use cvxstoc to solve it.

In general, cvxstoc is more specialized and optimized for solving stochastic programming problems, while cvxpy is more general and can handle a wider range of optimization problems.



Thanks,

Akshay

Thank you! Do you have a sample code cvxpy using Monte Carlo? May I have one if you dont? 



Thanks in advance for considering me.

Namaste!



 

Hi Jane,



We do not have a sample code for the same. We suggest you try coding it and let us know if you face any specific issues. 



Thanks,

Akshay