he’s a very powerful functions for applying the same function across many sets of data are even more powerful when combined with custom functions
to begin I’m going crazy that’s a matrix with 1010 calms containing 10000
if you work all I could use a fly to apply a function across each row or column
calculate the mean for each column
if I wanted I could also create a custom function on the Fly early
no thank you have a minute the braces for the function declaration
I did this since the function that can fit on one line but I could include braces if I liked
this in lines of functions is very useful functions on the Fly
I’m going to first load in the gets function then I’m going to call it inside of a fly
you better call it if it gets the eye function actually return to lit
the apply function adapts his outfit to accommodate complex outputs by the function being applied
sometimes are the times The Matrix
here since get out put the list the best way to represent many outfits of that function is to contain them in a sort of a list
this completes the fourth section of videos take some time to try out what you’ve learned in these first four sections of video browse online for some data or access them these data says that are already present in your our session
now I want to know what that return would be annualized so I’m going to take that turns + 1 raised to the 12th minus what okay 31.37% know this is a Formula I use all the time let’s say I want to create a custom function for this formula the first I’m going to open up my Visual Basic editor on a math you can do function option at 11
in a little project window like this is going to pop up now go to insert module now the first thing to do is you’re going to write function
face and the name of your function here I want to take monthly returns annualize I’m going to call my Mann monthly annualized return parentheses you’re going to put the name of your input monthly return and this talking is only going to have one input and then you’ll see it automatic popular at the end of the function so this is a very straightforward Funk I’m just going to write the name of the function equals and then I’m going to type out the Formula 1 plus
monthly
return sorry I’m a terrible paper raised to the 12th minus one and that’s it done but now I go back to my spreadsheet and I say equals m a n n fantasy then I’m going to click on my monthly return it’s going to analyze it for me 31.37% wonderful now let’s say that I don’t only want to be able to analyze monthly returns but also Daily return so here I’m going to put in Daily return I must say the daily return is 20 basis points
so now I want to function that can annualize a daily or monthly return so I’m going to go back to my Visual Basic editor and under this function I’m going to type a new function function that’s when we’re going to say a n n annualize and I’m going to put in my input they return party, you separate your invite to the,.
Now my function a n n is equal to 1 + return
raised to the number. We want to analyze for
minus one so now if I have a daily return I can use my new function equals a n n and I’m going to put in the return first
oh, the numbers. So that the daily return me on an annualized that there’s going to be 250 trading day and so that’s annualizing at about 65% not too shabby
don’t forget to subscribe for more Excel tips and tricks
2 a.m. or 8 p.m. and you just about to head out but that nasty error is popping up on your computer or maybe some other issues well and this video will try to help you. God bless
thank you for considering to like And subscribe thank you for watching may God bless you