0% found this document useful (0 votes)
6 views12 pages

Intro Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views12 pages

Intro Python

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Python for Scientific

Computing

Money, Banking and Payment Systems


Chair of Economic Theory
Resources

I QuantEcon lecture site:


http://lectures.quantecon.org/
I Scipy lecture notes:
http://www.scipy-lectures.org/
I Scipy cookbook:
http://scipy-cookbook.readthedocs.io/
I https://www.reddit.com/r/Python/
I http://stackoverflow.com/questions/tagged/python
Syllabus

3 tutorial sessions planned:


1. Introduction to Python
2. Simple economic applications in Python
3. Basic OLG model in Python

Tutorial notebooks will be available on the course web page before


class.
Assessment

Graded group assignment:


I Program one of the extensions of the OLG model seen in the
lectures;
I The submitted notebook should be self-contained (code,
math, explanation, results, plots).

Assignment details TBA on the course web page.


About Python

Modern, high level, free and open source, general purpose


programming language.

Used extensively by:


I Tech firms (e.g. YouTube, Dropbox, Reddit);
I Finance industry (e.g. hedge funds);
I Research agencies (e.g. NASA, CERN);
I Academia
Why Python?
Why Python?

Python is a free and open source programming language:


I Free as in freedom (libre);
I Free as in ”free beer”(gratis).

This means:
I Free to install and use;
I No license issues;
I Source code can be freely read, modified and shared.
Why Python?

I Simple to learn;
I Clean, elegant and very readable syntax;
I High productivity;
I Vast collection of libraries for almost everything;
I Powerful enough for scientific computing;
I Relatively simple tweaks offer performance comparable to
compiled languages (C, Fortran).
Major Scientific Libraries

I numpy: basic data types, array operations.


I scipy: high-level numerical routines (e.g. integration,
interpolation, optimization).
I matplotlib: plotting 2D and 3D figures.
I sympy: symbolic math computations (similar to
Maple/Mathematica).
I pandas: data analysis.
I statsmodels: statistics and econometrics.
I scikitlearn: machine learning.
I numba: just-in-time compilation for higher performance.
Getting started

It is strongly recommended to install one of the many Python


distributions (e.g. Anaconda, Canopy, WinPython) and to choose a
good programming interface (e.g. Jupyter, Vim, Spyder, PyCharm).

For this class, we will be using:


I Anaconda with Python 3.x;
I Jupyter (iPython) notebook.
Anaconda

Most popular scientific Python distribution!

Installation:
I Available at: https://www.continuum.io/downloads
I Choose Python 3.6 version;
I For details, please refer to installation guide on course website.
Jupyter Notebooks

For the tutorials, we will use Jupyter notebooks:


I Browser based front-end for over 40 programming languages
(e.g. Python, R, Julia, C++);
I Allows for live code, equations, visualizations and explanatory
text.

Jupyter is included in Anaconda:


I Command line: jupyter notebook

You might also like