Convert one level alpha to multilevel alphasParse a multilevel array to view-filefinding an entry in an multilevel associative arraysort multilevel array phpRuby On Rails - Group by, multilevelFilter multidimensional multilevel array to uniqMultilevel submenu codeigniterdynamically create a javascript/jquery multilevel arrayPHP Convert multi level multi-dimensional array to a tableHow to build dinamically a multilevel category with PHPphp 7 - sort multilevel associative array by keys to have it sorted on each level lexicographically
What organs or modifications would be needed for a life biological creature not to require sleep?
Is it Safe to Carbonate Beer in a Can?
How do we know that black holes are spinning?
Is low emotional intelligence associated with right-wing and prejudiced attitudes?
What are examples of experiments or studies where pre-registration would not be feasible?
Reading double values from a text file
Can derivatives be defined as anti-integrals?
How many ways you can go from point A to point B
What explanation do proponents of a Scotland-NI bridge give for it breaking Brexit impasse?
How to be sure services and researches offered by the University are not becoming cases of unfair competition?
The Planck constant for mathematicians
What was the motivation for the invention of electric pianos?
Parallel resistance in electric circuits
Why are some files not movable on Windows 10?
How do I say "quirky" in German without sounding derogatory?
Are there any “Third Order” acronyms used in space exploration?
What is the mathematical notation for rounding a given number to the nearest integer?
Real mode flat model
What is a "major country" as named in Bernie Sanders' Healthcare debate answers?
Can I tap all my opponent's lands while they're casting a spell to negate it?
Changing trains at Firenze S.M.N. train station - how fast can it be done?
Bit one of the Intel 8080's Flags register
What next step can I take in solving this sudoku?
Would it be unbalanced to increase Wild Shape uses based on level?
Convert one level alpha to multilevel alphas
Parse a multilevel array to view-filefinding an entry in an multilevel associative arraysort multilevel array phpRuby On Rails - Group by, multilevelFilter multidimensional multilevel array to uniqMultilevel submenu codeigniterdynamically create a javascript/jquery multilevel arrayPHP Convert multi level multi-dimensional array to a tableHow to build dinamically a multilevel category with PHPphp 7 - sort multilevel associative array by keys to have it sorted on each level lexicographically
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I would like to write a code for my master thesis but for this, I need to use multilevel alphas. How could adjust the following codes for multilevel alphas? I mean instead of alpha=0.05, I need alphas=c(0.01,0.05,0.1). Please help me it is really important for my thesis.
risk = function(densities, alpha, method)
#Estimates the alpha Value-at-Risk and Expected Shortfall for the n trading days in densities
#densities = matrix with the empirical distributions (columns) for n trading days (rows)
output = matrix(data = vector(length = length(densities[1,]) * 2) , nrow = length(densities[1,]), ncol = 2)
colnames(output) = c("VaR","ES")
len = length(densities[,1])
if(method == "FHS")
i = (1 - alpha * 2) * len
output[,1] = sqrt(densities[i,])
output[,2] = apply(sqrt(densities[i:len,]), 2, mean)
else
i = alpha * len
output[,1] = -densities[i,]
output[,2] = apply(-densities[1:i,] , 2, mean)
return (output)
multidimensional-array
add a comment
|
I would like to write a code for my master thesis but for this, I need to use multilevel alphas. How could adjust the following codes for multilevel alphas? I mean instead of alpha=0.05, I need alphas=c(0.01,0.05,0.1). Please help me it is really important for my thesis.
risk = function(densities, alpha, method)
#Estimates the alpha Value-at-Risk and Expected Shortfall for the n trading days in densities
#densities = matrix with the empirical distributions (columns) for n trading days (rows)
output = matrix(data = vector(length = length(densities[1,]) * 2) , nrow = length(densities[1,]), ncol = 2)
colnames(output) = c("VaR","ES")
len = length(densities[,1])
if(method == "FHS")
i = (1 - alpha * 2) * len
output[,1] = sqrt(densities[i,])
output[,2] = apply(sqrt(densities[i:len,]), 2, mean)
else
i = alpha * len
output[,1] = -densities[i,]
output[,2] = apply(-densities[1:i,] , 2, mean)
return (output)
multidimensional-array
add a comment
|
I would like to write a code for my master thesis but for this, I need to use multilevel alphas. How could adjust the following codes for multilevel alphas? I mean instead of alpha=0.05, I need alphas=c(0.01,0.05,0.1). Please help me it is really important for my thesis.
risk = function(densities, alpha, method)
#Estimates the alpha Value-at-Risk and Expected Shortfall for the n trading days in densities
#densities = matrix with the empirical distributions (columns) for n trading days (rows)
output = matrix(data = vector(length = length(densities[1,]) * 2) , nrow = length(densities[1,]), ncol = 2)
colnames(output) = c("VaR","ES")
len = length(densities[,1])
if(method == "FHS")
i = (1 - alpha * 2) * len
output[,1] = sqrt(densities[i,])
output[,2] = apply(sqrt(densities[i:len,]), 2, mean)
else
i = alpha * len
output[,1] = -densities[i,]
output[,2] = apply(-densities[1:i,] , 2, mean)
return (output)
multidimensional-array
I would like to write a code for my master thesis but for this, I need to use multilevel alphas. How could adjust the following codes for multilevel alphas? I mean instead of alpha=0.05, I need alphas=c(0.01,0.05,0.1). Please help me it is really important for my thesis.
risk = function(densities, alpha, method)
#Estimates the alpha Value-at-Risk and Expected Shortfall for the n trading days in densities
#densities = matrix with the empirical distributions (columns) for n trading days (rows)
output = matrix(data = vector(length = length(densities[1,]) * 2) , nrow = length(densities[1,]), ncol = 2)
colnames(output) = c("VaR","ES")
len = length(densities[,1])
if(method == "FHS")
i = (1 - alpha * 2) * len
output[,1] = sqrt(densities[i,])
output[,2] = apply(sqrt(densities[i:len,]), 2, mean)
else
i = alpha * len
output[,1] = -densities[i,]
output[,2] = apply(-densities[1:i,] , 2, mean)
return (output)
multidimensional-array
multidimensional-array
asked Mar 28 at 10:50


VUSAL MAMMADZADAVUSAL MAMMADZADA
11 bronze badge
11 bronze badge
add a comment
|
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395734%2fconvert-one-level-alpha-to-multilevel-alphas%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55395734%2fconvert-one-level-alpha-to-multilevel-alphas%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown