I hereby claim:
- I am fatihgune on github.
- I am fatih_gunes (https://keybase.io/fatih_gunes) on keybase.
- I have a public key ASA6Fr9XK2q57SSYlbMPhd9FgtbEH9fXsNYivpiM-_7maQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <? | |
| public function returnProbabilityFromTheTable($zValue) | |
| { | |
| return $this->CDF($zValue); | |
| } | |
| public function sgn($x) | |
| { | |
| if ($x < 0) { |
| <? | |
| /** | |
| * @param mixed $x | |
| * @return float|int | |
| */ | |
| public function cumNormDist($x) | |
| { | |
| $b1 = 0.319381530; | |
| $b2 = -0.356563782; |
| <? | |
| /** | |
| * @param mixed $x | |
| * @return string | |
| */ | |
| public function normDist($x) | |
| { | |
| // Load tabulated values in an array | |
| $values = config('table'); |
| <? | |
| /** | |
| * @param mixed $y | |
| * @return string | |
| */ | |
| public function normDistInv($y) | |
| { | |
| // Load tabulated values in an array | |
| $values = config('table'); | |
| // Discriminate upon whether $y is between 0 and 1, then upon its position relative to 0.5 |
| <? | |
| $years = config('years'); | |
| $companies = Company::where('bankrupted', 'yes')->where('country', 'COUNTRY_NAME_HERE')->where('type', 'unlisted')->get(); | |
| foreach ($years as $year) { | |
| foreach ($companies as $company) { | |
| if (AssetMatch::where('unlisted_company_name', $company->name) | |
| ->where('year', $year)->exists()) { | |
| $marketCapitalization = AssetMatch::where('unlisted_company_name', $company->name) |
| <? | |
| /** | |
| * @param mixed $search | |
| * @param array $arr | |
| * @return mixed|null | |
| */ | |
| public function getClosestNumber($search, array $arr) | |
| { | |
| $closest = null; |
| <? | |
| // Get all book asset records for given country and type (unlisted and bankrupted companies only) | |
| $allUnlistedAssets = BookAsset::join('companies AS c', 'company_id', '=', 'c.id') | |
| ->where('c.type', '=', 'unlisted') | |
| ->where('c.country', '=', 'COUNTRY_NAME_HERE') | |
| ->where('c.bankrupted', '=', 'yes') | |
| ->get(); | |
| // Sort them by their value's descending order |
| <? | |
| // From 2006 to 2019 | |
| $years = config('years'); | |
| // Get All normal distribution records of bankrupted companies for selected Country | |
| $allBankruptedCompaniesCount = NormalDistribution::join('companies AS c', 'company_id', '=', 'c.id') | |
| ->where('c.country', '=', 'UK') | |
| ->where('c.bankrupted', '=', 'yes') | |
| ->get()->unique('company_id') | |
| ->count(); |
| <? | |
| public function calcCurve(): void | |
| { | |
| // might take a while, preferred way is to add this to ini | |
| ini_set('max_execution_time', 600); | |
| $years = [ | |
| '2006', | |
| '2007', |