How do I compute VaR of a simple equity portfolio? I know current weights and can easily access the history of the stocks' daily returns.
There are a few different ways to calculate VaR.
For this method, you calculate the return of your portfolio each day, and get a list of daily returns over your calibration period. Once you have this, then you find the 5th percentile to give the 95% VaR.
The advantage of this method is that it is the most straightforward to compute, and you don't need to make any assumptions on the distribution of returns to make this calculation, and it can handle nonlinear assets.
For this method, you assume returns are normally distributed. First compute the mean and covariance matrix of your assets, then using the weights of your portfolio you can compute the distribution of portfolio returns. Calculate the 5% point of the CDF to get the 95% VaR.
The advantage of this method is that you can calculate a "forward looking" VaR by incorporating a different return/covariance matrix. Care must be taken to estimate the covariance matrix for this method.
Monte Carlo Simulation
For this method, you specify the stochastic process for your assets and run a bunch of simulations. The VaR is calculated based on all the sample paths.
This can be computationally expensive, but the good thing about this method is that you have complete freedom to define the underlying dynamics and it can handle nonlinear assets.