Aligned Rank Transform with Matlab

This function is written to do aligned rank transform using matlab

for a data with heavy tail, this function could be used for getting the aligned rank transformed data and implementing Analysis of variance and mixed effect models
This is an approach used when the data has non-normal distribution

Continue reading Aligned Rank Transform with Matlab

Reliability analysis using Cronbach’s alpha

I’ve written a Matlab function, which calculates the Cronbach’s alpha between some items and do the if item is deleted process. this function will automatically delete the item which increase the Cronbach’s alpha maximally. before entering in if item is deleted process it checks the initial Cronbach’s alpha. if the Cronbach’s alpha value was greater than 0.8. then the function will return a message that there is an excellent reliability and no item is required to be deleted. Continue reading Reliability analysis using Cronbach’s alpha

Monte Carlo simulation of Value at risk

I’ve written a code in Visual basic (excel macro), to do Monte Carlo repetitions to find the value at risk. for this reason, I’ve used Cornish-fisher expansion.

The formula for Value at risk, uses volatility, skewness and excess kurtosis and the number of trading periods in the recommended holding period to find the value at risk.


Continue reading Monte Carlo simulation of Value at risk

Random walk movement

In this project, I wrote a matlab code to keep a marker which moves randomly toward a square area, inside the boundary. so the marker moves with a specific speed in a random direction. when the marker reaches to the boundary of the square area, it will first bounce back and then will keep moving to the another random direction. the number of movement and speed of the marker could be chosen by the user.

Continue reading Random walk movement

Exponential smoothing

Exponential smoothing method for finding the trend and seasonality of the data and doing forecast. simple exponential smoothing is for the data which doesn’t have seasonality. for data which has seasonality exponential smoothing has three formula as we could see in the figure below:

exponential smoothing formula

at is level, bt is the trend and Ft is seasonality. alpha, beta and gamma are the damping ratio in appropriate with level, trend and seasonality respectively.

Continue reading Exponential smoothing

Effects on ORP of increased cyanuric stablizer

This excel sheet includes table and formula of the mv – oxidation reduction potential.

The formula uses ppm/cl2 and ppm cyanuric  acid concentrate in a function and finds the mv – oxidation reduction potential /CI2 equivalent and finally it draw the curves for various ppm/cl2 from 0.3 to 4.

Continue reading Effects on ORP of increased cyanuric stablizer