Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Everyone and welcome in this new with you in this video, we're going to see the run them modular off
the Nampai library.
Run them is very important.
When we walk in finance because a lot of things follow, run them process.
So it is very important to understand how to simulate some random number to walk in finance.
So let's begin by creating a random array, a one dimensional random array containing random value between
zero and one.
To do it, we need the library, then buy the module random and the function rent.
And here we put the number of one, the value that we want in one dimensional.
All right.
And now we have random value created by Nampai, but sometimes we want, for example, a two dimensional
array and it is necessary to transform a one dimensional way to a two dimensional.
All right.
So I will show you quickly how to do it because it is very important to note.
I just print the shape, the actual shape of all.
All right, then I will reshape it to reshape a one dimensional army in a two dimensional.
Right?
We just need to put an artificial column, so instead of being a number with a shape.
Six, for example, it will be a number with a hair shape.
Six rows and one column.
So to do it to just had artificially this column.
We are going to reshape this, all right, by putting minus one and one.
And now if?
I.
Print again, the shape
we can see that we have transformed our one dimensional right into a two dimensional RNA and decentralisation
change anything in the venue of the.
So it is very important to understand it to.
Then sometimes we want to create a new tinker to run them the value.
So to do it, we need to use.
The hammering them by them, would you run them and the function runs beneath?
So I want, for example, integral value between zero and 100.
So I put 100 and I need to put the site.
So if I want a matrix with five rows and five columns, I put a size of five five.
Then we are going to see how to simulate value from one of the best known and the best famous law of
probability in finance, which is the normal law, so to do it, we're going to use the random module
again and the normal function.
So we need to put the lock, which is the mean of the law.
Then this column, which is the standard deviation of this law and we need to put the size.
For example, if I want to create a one dimensional array, I put a size of six comma nothing.
And if I want a two dimensional art, for example, I can do, ladies.
Just put a number for the number of columns.
Then let me show you a very important thing when we walk with random, when we work with random number.
If I run again this cell, I have always another set of number.
But sometimes if, for example, we want
to, I don't know, share a little code or something else.
And you have to write, for example, or we with Frizzled, et cetera.
We need to set the scene to always have the same random number because if someone else want to verify
something in your code, it will have always.
No, so it will be very difficult to fix an issue, for example.
So sometimes you need to fix the seat of the sheets, so.
I just show you that with the same function, we have different results.
So now I will set the scene to.
And if and now we can see that all the time that we put there said it, all the number are the same.
So it is very important to understand because when you find some code on GitHub to create your own project,
et cetera, you will need to understand the code of their overall program.
So it will be very helpful to understand this function because must of containing it.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.