0% found this document useful (0 votes)
7 views

Python 1

This document introduces a video series on learning financial analysis with Python. It covers 18 modules divided into 5 sections: Python basics, useful libraries, data management, data analytics, and advanced analytics. The first section teaches Python syntax and basics. It recommends using either Anaconda or Google Colab for running Python code. Colab is ideal for beginners as it requires no setup and provides free GPU access. The document provides instructions for installing Anaconda and using Colab notebooks. It concludes with basic code exercises for users to practice on their own.

Uploaded by

Alex Yuen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Python 1

This document introduces a video series on learning financial analysis with Python. It covers 18 modules divided into 5 sections: Python basics, useful libraries, data management, data analytics, and advanced analytics. The first section teaches Python syntax and basics. It recommends using either Anaconda or Google Colab for running Python code. Colab is ideal for beginners as it requires no setup and provides free GPU access. The document provides instructions for installing Anaconda and using Colab notebooks. It concludes with basic code exercises for users to practice on their own.

Uploaded by

Alex Yuen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Special Funding Scheme for Innovation in Virtual Education in Business, CUHK

Learning Financial Analysis with Python from Scratch

Module 1 Introduction

1.1 Objectives
Programming knowledge become more important in the business world. Even if you are not working
as a programmer, basic coding skills can help you a lot in your study and career.
 This video aims at providing basic coding skills in Python for people without any
programming background.
 Throughout these 18 modules, we will learn basic coding, data management, and finally
data analytics to help decision making.

1.2 The structure of the series


This series of videos covers 18 videos, and they can be divided into five sections.
I. Python Basic section teaches you how to install Python and learn the basic syntax.
1. Introduction
2. Basic operations
3. Conditional operations and loops
4. List
5. Defining functions
II. Libraries section introduces some useful libraries to you with a deeper explanation of Numpy
and Pandas.
6. Libraries
7. Input and Output
8. Numpy
9. Pandas
III. Data management section digs into the details of managing a dataset and getting statistics
and graphics of the dataset.
10. Data cleaning
11. Data consolidation
12. Summary statistics
13. Data visualization

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 1


IV. Data Analytics section introduces tools for you to conduct basic regression analysis and time
series analysis.
14. Regression analysis
15. Time series analysis
V. Advanced Data Analytics section is for people who want to know about machine learning and
algorithmic trading
16. Machine learning
17. Algorithmic trading
18. Conclusion

1.3 Introduction to Python


Python is one of the most popular coding languages.
 It gains popularity among not only software developers and experienced users but also
amateurs and beginners.
Python is beginner-friendly:
1. It is easy to code and understand as its structure is very similar to English.
2. It is a general-purpose programming language that can be used in different areas, making
Python skills can be transferable when users shift to another field to work.
3. It is supported by a wide range of libraries that save beginners a lot of time in learning
complicated programming syntax.
4. The growing community of Python users makes continuous improvements in the support and
libraries for the program.

1.4 Installation
You can run Python in both a software and a cloud environment.
1. Anaconda - Jupyter
2. Colab (Recommended)
Anaconda is a distribution of the Python programming languages, so you can run Python scripts by
using Anaconda.
1. The platform has a wide range of data science packages.
2. The environment is user-friendly.
3. It provides tools for users to collect data from other sources.

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 2


Instruction
1. Go to the link
https://www.anaconda.com/products/distribution#Downloads
 Select the suitable distribution for your
operating system.

2. Press the downloaded file to start the installation.


 Click “Next”.

3. Click “I agree”.

4. Click “Just me”, and click “Next”.

5. Leave the destination folder as default or specify a


specific folder, then click “Next”.

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 3


6. Click “Install”, then installation starts.

7. Click “Finish” to finish the installation.

8. Then the “Anaconda navigator” will be launched.


 Jupyter notebook is built-in software that you
don’t need to install it again.
 Click “Launch” below the Jupyter icon.

9. Click “New” and select “Python3” to create your


first Python notebook (program).

10. The whole notebook is made up of cells.


 Cells have two types: code cell and text cell.

11. You can press “Run” to run all codes in the


notebook.
 Or press “Enter + Ctrl” to run a single cell.

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 4


Colab is a cloud Python environment provided by Google. It’s recommended for beginners for the
following reasons:
1. Zero configuration required: You can easily test and run your Python codes on it, without
setting up local environments on your computers.
2. Free GPU. You can also access to GPUs free of charge.
3. Convenience for sharing. You can easily share codes to manage simultaneous editing with
collaborators.

Instruction
1. Search “Colab” from the web.
 Go to “Welcome to Colaboratory – Google
Research”

2. You will be led to the welcome page.


 You can create your first notebook by
clicking “New notebook” in the bottom.
 Or, click “File -> New notebook”.

3. The Colab notebook has similar layouts to


Jupyter notebook (which is on Anaconda).
 We can run a single cell with press “Run
button”, or Press “Enter + Ctrl”.
 The output result will display below.

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 5


4. Click the third button “Variable” in the left bar
 We can view the variables that we defined
in the code.

5. You can add text cells to add an explanation to


your codes.

6. You can share this notebook with your


collaborators by clicking “Share”
 Just as you share a google doc or slide.

7. You can export the Colab notebook via clicking


“File -> Download”
 Select its format either “.ipynb” or “.py”.

1.5 Exercises
Please try the following codes on Jupyter notebook and Colab to see what the output would be:
1. print(“Hello”)

2. 32+53

3. print(“The answer is “, 25*8)

4. 26*18

5. print(“H\ne\nl\nl\no”)

End of Module 1

LI Jialu & PHU Jacqueline & Dr. Edwin MOK 6

You might also like