Créer un compte gratuit Rejoignez Calaméo pour publier et partager vos documents !
Notez et commentez vos publications favorites, téléchargez des documents, partagez vos lectures avec vos amis.
Ivan Idris

Ivan Idris

Pays-bas
 
Membre depuis 5 mois
 
Affichage :
NumPyEulerProblem5

ivanidris. net NumPy Project Euler Problem 5 Project Euler Problem 5is one of those problems that seem hard, but turn out to be trivial after you think about them. In this case it is very important to use the information given to you in the problem. This means using the fact that 2520 is the smallest number that can be divided by... Plus

Par

Document Adobe PDF

Publiée le 18 Fév. 2012

Pages: 1

Lectures: 0

Téléchargements: 0

NumPyEulerProblem6

ivanidris. net NumPy Project Euler Problem 6 Project Euler Problem 6 is perfect to demonstrate the power of NumPy. No loops are required and only a few lines of code. 1. Create an array with the first 100 natural numbers First we will create a NumPy array of the numbers 1 – 100 with the arange function. 2. Sum the squares of the... Plus

Par

Document Adobe PDF

Publiée le 18 Fév. 2012

Pages: 1

Lectures: 0

Téléchargements: 0

NumPyProjectEuler7

ivanidris. net NumPy Project Euler Problem 7 Project Euler Problem 7 is about prime numbers. So I implemented a Sieve of Eratosthenes with NumPy. I am not following the algorithm to the letter, but I believe that the result is the same. 1. Create a list of consecutive integers The first mandatory step is to create a list of natural... Plus

Par

Document Adobe PDF

Publiée le 18 Fév. 2012

Pages: 1

Lectures: 1

Téléchargements: 0

NumPyProjectEuler1

ivanidris. net NumPy Project Euler Problem 1 Project Euler is a website that lists a number of mathematical problems, which are perfect to be solved with NumPy. Let’s start the new year with Problem 1. 1. Call the arange function Call the arange function in order to store all the integers from 1 to 1000 in an array. # 1. Numbers... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 2

Lectures: 0

Téléchargements: 0

NumPyProjectEuler3

ivanidris. net NumPy Project Euler Problem 3 Project Euler Problem 3 seems almost impossible to crack. However, using the right algorithm – Fermat’s factorization method and NumPy, it becomes very easy. The idea is to factor a number N into two numbers c and d. N = c * d = (a + b) (a - b) = a ** 2 - b ** 2 We can apply the... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 2

Lectures: 0

Téléchargements: 0

NumPyProjectEuler4

ivanidris. net NumPy Project Euler Problem 4 Project Euler Problem 4 is a bit silly. It’s about palindromic numbers. I could not find an appropriate algorithm, so I just tried something out. It seems to work OK. 1. Create a 3-digit numbers array We will create an array to hold 3-digit numbers from 100 to 999 using our favorite... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 2

Lectures: 0

Téléchargements: 0

NumPyJarqueBera

ivanidris. net Jarque Bera, the CAPM and undervalued stocks The Capital Asset Pricing Model ( CAPM ) links the expected return of assets to their risk. A linear fit of this relationship gives us the so called Security Market Line ( SML ). One of the problems with this model is that it assumes a normal distribution of returns. The... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 2

Lectures: 4

Téléchargements: 0

NumPyPandas

ivanidris. net Portfolio analysis with Pandas for the win I saw a PyCon presentation about pandas. Pandas is a data analysis Python library, which works with timeseries data and handles missing data automatically. It is based on NumPy and should work well together with for instance scikits. statsmodels. Pandas correlation A Panda... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 1

Lectures: 1

Téléchargements: 0

NumPyProblemEuler2

ivanidris. net NumPy Project Euler Problem 2 Project Euler Problem 2 is definitely harder than Problem 1. This one requires reading the Fibonacci numbers Wikipedia article. I read that the Project Euler problems are some sort of katas. Katas are what martial artist call exercises, preparing you for real-life fighting situations.... Plus

Par

Document Adobe PDF

Publiée le 27 Jan. 2012

Pages: 3

Lectures: 0

Téléchargements: 0

NumPyOptimalHoldingPeriod

What is the optimal holding period for shares? The plan for today is: 1. Define a volatility band for the log of stock prices and mean reverting strategy based on dips below the band. 2. Optimization for the holding period of shares. 3. Profit and champagne(optional). The band The first step in defining the band is transforming... Plus

Par

Document Adobe PDF

Publiée le 7 Jan. 2012

Pages: 3

Lectures: 0

Téléchargements: 0