- Data can be retrieved either from DSE website or from downloaded file. Variance Covariance method is implemented by default, other methods can also be incorporated by changing parameters.
- VaR_U.Rmd is an R Notebook and generates a html page with the outputs, VaR_U.R is an R code file and writes outputs to an .xlsx file. VaR_Manual.R contains codes for calculating VaR manually (without utiliing built-in functions).
- VaR.py is the python equivalent of VaR_Manual.R. The provided GoogleColab notebook executes the code.
- However, it is recommended to use either VaR_U.Rmd or Var_U.R as they offer more functionalities.
- We have to provide portfolio information in the form of port.xlsx, the file should have Instrument names in the first column, Market Values in the second and Cost Price in the third column. The column names should be 'Instrument', 'MKT_VAL' and 'Cost' respectively.
tanvird3 / value_at_risk Goto Github PK
View Code? Open in Web Editor NEWValue of risk calculation for portfolios in Dhaka Stock Exchange
Home Page: https://colab.research.google.com/drive/1LoKE-x7iq1bdcIxDX2rh91gGJZJqwnzx?usp=sharing
License: MIT License