Python for Finance
This is a course for financial analysts, traders, risk analysts, fund managers, researchers, data scientists, statisticians, and software developers.
Some familiarity with programming concepts (in any language) is assumed.
By the end of the course, you will have all the knowledge you need to start using Python competently for processing, analysing, modelling, and visualising financial data, with a focus on time series. You will have had experience with using Python for various scripting, data-manipulation and visualisation tasks with data in a variety of formats, including SQL databases, CSV, Excel spreadsheets, JSON, and API endpoints. You will know how to slice, dice, merge, aggregate, pivot, clean, munge, resample, and plot financial time-series data with ease. You will understand the elegance and power of the Python language and its powerful ecosystem of packages for finance and data analytics, and you will be well-placed to continue learning more as you use it day-to-day.
Day 1: Python Basics
Day 1 covers how to use Python for basic scripting and automation tasks, including tips and tricks for making this easy. The syllabus is as follows:
- Why use Python for finance? What’s possible? Python versus Java, C#, R, Matlab …
- Setting up your Python development environment (IDE, IPython notebook)
- Python syntax and concepts: an introduction through examples, including
- Essential data structures: strings, tuples, lists, dictionaries and sets, and their applications
- Input and output of text data (including CSV files)
- String methods
- Raising and handling exceptions
- Tour of the amazing standard library, including
- Handling dates and times
- Fetching data from the web
- Compressing and uncompressing data
Day 2: Handling, analyzing and presenting data in Python
The Pandas package is an amazingly productive tool for working with and analysing tabular data. Day 2 gives a thorough introduction to Pandas and related tools for reading, writing and analyzing important data formats, including spreadsheets, time-series data, and SQL databases:
- Reading and writing essential financial data formats: CSV, Excel, SQL, HDF5, JSON, XML (on request)
- Indexing and selecting data in Pandas
- Data fusion: joining & merging datasets
- Pivot tables
- Summarizing data with "group by" operations
- Visualization and statistical graphics with Seaborn
- Creating automated reports from Jupyter notebooks
Day 3: Analyzing financial time-series data
Day 3 teaches you in-depth about working with financial time-series data in Python:
- Handling time-series data: parsing dates, resampling, handling time-zones
- Secret weapons in Pandas: searchsorted, hierarchical indices, unstack, styles
- Handling missing data and outliers; outlier detection with clustering
- Visualizing time-series data interactively
- Examples: running Monte Carlo risk simulations with Python and Excel
We also encourage you to bring your own data sets to the course where relevant.
We will supply you with printed course notes and a USB stick containing a complete Python environment based on VirtualBox. This saves time in the course and allows us to focus on using Python rather than installing it. The USB stick also contains kitchen-sink Python installers for multiple platforms, solutions to the programming exercises, several written tutorials, and reference documentation on Python and the third-party packages covered in the course.
- Personal help:
- Your trainer(s) will be available after the course each day for you to ask any one-on-one questions you like — whether about the course material and exercises or about specific problems you face in your work and how to use Python to solve them.
- Food and drink:
- We will provide lunch, morning and afternoon tea, and drinks.
- The course will run from 9:00 to roughly 17:00 each day, with breaks of 45 minutes for lunch and 15 minutes each for morning and afternoon tea.
Python for Finance:
60 Clarence Street (Level 4), Sydney CBD
18 Nov – 20 Nov 2019