# Simulation Exercises In Matlab

Posted Under: Algorithms

Order Now

#### Related Study Services

DESCRIPTION
Posted
Modified
Viewed 17
Please, can you help me with 3 exercises in matlab? I attach the exercises in the pdf file. Please perform the simulations in matlab scripts in a single script and detail the steps of the algorithm. For exercise 1 you cannot use the built-in functions of matlab but you must perform the algorithm. Please send me the cost and payment method, I require the exercises until June 18, 2022.

This order does not have tags, yet.

Attachments
1 — ∀ ≤ 1. Generate random variables for the following bivariate copulas: Gaussiana (ρ = 20%), t-Student (ρ = 50%, d = 3), Clayton (α = 4) y Gumbel (α = 3). Present your results through scatter plots of 2000 simulations of the random variables x and y of the random variables x and y, as well as their transformation into the variables v ∼ U [0, 1] y z ∼ U [0, 1]. Integrated matlab functions cannot be used. 2. Consider a portfolio of credits with n references, each with a nominal value Ai and a Loss given default 1 where Ri es el Recovery rate. The total loss of the loan portfolio in the time t, Loss, is given by where 1{τi < t} is a dummy variable equal to 1 when i is less than t, and 0 otherwise. Under the context of Models in Reduced Form, τi is a continuous random variable denoting the moment of occurrence of the default event, Fi is its cumulative distribution function , y Si es su función de supervivencia, dada por where is the hazard rate, the instantaneous probability of default for credit i, and is the cumulative default intensity. It is also assumed that the events of default are not independent, and on the contrary, there is a dependency structure between them that affects the distribution of losses. The joint distribution of default events is defined by F (t1, t2, . . . , tn) = Pr(τ1 ≤ t1, τ2 ≤ t2, . . . , τn ≤ tn) For a homogeneous portfolio with 100 credits, each with a maturity of 1 year, a nominal value Ai = \$1, Lgd = 100%, values for the hazard rate λ = [5%, 20%, 50%], perform the simulation of the loss distribution of each portfolio, graph its frequency histogram, present statistics descriptive (i.e. mean, median, mode, variance and standard deviation), and calculate your Credit value-at-risk (CVaR) at 90%, 95% and 99% confidence. The joint distribution of default events must be modeled for a Gaussian copula and t-Student, with correlation coefficient ρ = [10%, 50%, 90%] . The t-Student copula also assumes df = 5. 3. For the simulated loss distributions in exercise 2 from a Gaussian copula and Student's t with hazard rate λ = 20% and correlation coefficient ρ = 50%, estimate your function of probability density (PDF) from Finite mixture models. This methodology is useful for estimating forms of unknown distributions, or those that even being known are very complex, and therefore, a single parametric distribution is unsatisfactory. For a random variable, X, the finite mixture technique assumes that its PDF g (x; ψ) can be modeled as the weighted sum of c densities, 1 The Lgd quantifies the losses in case of a default event, and its value depends on several factors (e.g. the quality of the collateral). • 2 where πi are the weights, such that 0 ≤ πi ≤ 1 ∀i = 1, . . . , c, , and denotes the functions of component density with and i denotes the parameters. For the estimation of the PDF, assume that is a Lognormal function, and the number of functions to weight c = 3. In this exercise, consider the Maximum Likelihood estimation using the algorithm Expectations-Maximization.. • References: – Cherubini V., Luciano E., and W. Vecciato. (2004). Copula Methods in Finance. John Wiley & Sons. – Hardle W., Hautsch N., and L. Overbeck. (2009). Applied Quantitative Finance. Second Edition. Springer. – Brigo D., Pallavicini A., and R. Torresetti. (2010). Credit Models and the Crisis: A Journey into CDOs, Copulas, Correlations and Dynamic Models. Wiley Finance.