SlideShare a Scribd company logo
Using Pandas,Numpy calculate
stock statics and HPY
WI258@NAVER.COM
First need to know concept
Python concept and code
Pandas (data refinement package)
Numpy (data array and statics package)
statistics and HPY formula
statistics and HPY formula
mean : HPY(HPR) :
variance :
standard deviation:
Import stock data and refinement
First download stock
file on yahoo. And
then refine Date,
Open , Close Data,
Print it
In second one
have loc function .
Loc function
refine line data
mean , standard deviation , variance
Using Numpy statistic
function calculate statistics
value.
Numpy statistics function
함수
np.sum Calculate data sum
np.mean Calculate data mean
np.std Calculate data standard deviation
np.var Calculate data variance
np.min , np.max Calculate data minium and maxium
np.argmin, np.argmax Calculate data aggregate minium and maxium
np.cumsum Calculate every data cumulative sum(from 0
increasing)
np.cumprod Calculate every data cumulative multiply(from
1 multiplying)
Calculate HPY
First enter HPY formula
and then print function.
But in data no Date, so
need to refine Date data
Finally, will combine two date. For combining two
data, will use DataFrame function. Because
DataFrame use for two-dimentional matrix. If just
have just one data, it is first two-dimentional
matrix.
Finally ,print Apple HPY value
Thank you !
If have problem, please send to me email

More Related Content

What's hot

pandas - Python Data Analysis
pandas - Python Data Analysispandas - Python Data Analysis
pandas - Python Data AnalysisAndrew Henshaw
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | EdurekaEdureka!
 
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...Smarten Augmented Analytics
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installingMohd Sajjad
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using PythonChariza Pladin
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception HandlingMegha V
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysisPramod Toraskar
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonManishJha237
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1Kirti Verma
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slidesrfojdar
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPyDevashish Kumar
 
Random forest
Random forestRandom forest
Random forestUjjawal
 

What's hot (20)

pandas - Python Data Analysis
pandas - Python Data Analysispandas - Python Data Analysis
pandas - Python Data Analysis
 
Intro to Jupyter Notebooks
Intro to Jupyter NotebooksIntro to Jupyter Notebooks
Intro to Jupyter Notebooks
 
Python programming : Files
Python programming : FilesPython programming : Files
Python programming : Files
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
 
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...
What is the KMeans Clustering Algorithm and How Does an Enterprise Use it to ...
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using Python
 
Python Exception Handling
Python Exception HandlingPython Exception Handling
Python Exception Handling
 
Basic of python for data analysis
Basic of python for data analysisBasic of python for data analysis
Basic of python for data analysis
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
 
File Handling in Python
File Handling in PythonFile Handling in Python
File Handling in Python
 
R basic syntax
R   basic syntaxR   basic syntax
R basic syntax
 
Data Analysis in Python-NumPy
Data Analysis in Python-NumPyData Analysis in Python-NumPy
Data Analysis in Python-NumPy
 
Python - Lecture 11
Python - Lecture 11Python - Lecture 11
Python - Lecture 11
 
Supervised learning
  Supervised learning  Supervised learning
Supervised learning
 
Python programming : Classes objects
Python programming : Classes objectsPython programming : Classes objects
Python programming : Classes objects
 
Random forest
Random forestRandom forest
Random forest
 

Similar to Python Finance

Fake News and Their Detection
Fake News and Their DetectionFake News and Their Detection
Fake News and Their DetectionKourosh Sajjadi
 
Study material ip class 12th
Study material ip class 12thStudy material ip class 12th
Study material ip class 12thanimesh dwivedi
 
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...Turi, Inc.
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessingAbdurRazzaqe1
 
Congrats ! You got your Data Science Job
Congrats ! You got your Data Science JobCongrats ! You got your Data Science Job
Congrats ! You got your Data Science JobRohit Dubey
 
Summer Independent Study Report
Summer Independent Study ReportSummer Independent Study Report
Summer Independent Study ReportShreya Chakrabarti
 
PorfolioReport
PorfolioReportPorfolioReport
PorfolioReportAlbert Chu
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning materialArthyR3
 
Comparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxComparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxPremaGanesh1
 
Statistics in Data Science with Python
Statistics in Data Science with PythonStatistics in Data Science with Python
Statistics in Data Science with PythonMahe Karim
 
Python for Scientists
Python for ScientistsPython for Scientists
Python for ScientistsAndreas Dewes
 
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Red Hat Developers
 
Turbocharge your data science with python and r
Turbocharge your data science with python and rTurbocharge your data science with python and r
Turbocharge your data science with python and rKelli-Jean Chun
 

Similar to Python Finance (20)

NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
Fake News and Their Detection
Fake News and Their DetectionFake News and Their Detection
Fake News and Their Detection
 
Study material ip class 12th
Study material ip class 12thStudy material ip class 12th
Study material ip class 12th
 
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...
Declarative Machine Learning: Bring your own Syntax, Algorithm, Data and Infr...
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessing
 
NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 
Congrats ! You got your Data Science Job
Congrats ! You got your Data Science JobCongrats ! You got your Data Science Job
Congrats ! You got your Data Science Job
 
DS LAB MANUAL.pdf
DS LAB MANUAL.pdfDS LAB MANUAL.pdf
DS LAB MANUAL.pdf
 
Summer Independent Study Report
Summer Independent Study ReportSummer Independent Study Report
Summer Independent Study Report
 
Howto argparse
Howto argparseHowto argparse
Howto argparse
 
PorfolioReport
PorfolioReportPorfolioReport
PorfolioReport
 
Java conceptual learning material
Java conceptual learning materialJava conceptual learning material
Java conceptual learning material
 
BDACA - Tutorial5
BDACA - Tutorial5BDACA - Tutorial5
BDACA - Tutorial5
 
Comparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptxComparing EDA with classical and Bayesian analysis.pptx
Comparing EDA with classical and Bayesian analysis.pptx
 
Statistics in Data Science with Python
Statistics in Data Science with PythonStatistics in Data Science with Python
Statistics in Data Science with Python
 
weatherr.pptx
weatherr.pptxweatherr.pptx
weatherr.pptx
 
Python for Scientists
Python for ScientistsPython for Scientists
Python for Scientists
 
Introductio2.docx
Introductio2.docxIntroductio2.docx
Introductio2.docx
 
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...
 
Turbocharge your data science with python and r
Turbocharge your data science with python and rTurbocharge your data science with python and r
Turbocharge your data science with python and r
 

Recently uploaded

Latino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino CaucusLatino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino CaucusDanay Escanaverino
 
Webinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont BraunWebinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont BraunFinTech Belgium
 
when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.DOT TECH
 
PD ARRAY THEORY FOR INTERMEDIATE (1).pdf
PD ARRAY THEORY FOR INTERMEDIATE (1).pdfPD ARRAY THEORY FOR INTERMEDIATE (1).pdf
PD ARRAY THEORY FOR INTERMEDIATE (1).pdfJerrySMaliki
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxmarketing367770
 
Introduction to Economics II Chapter 25 Production and Growth.pdf
Introduction to Economics II Chapter 25 Production and Growth.pdfIntroduction to Economics II Chapter 25 Production and Growth.pdf
Introduction to Economics II Chapter 25 Production and Growth.pdfSafa444074
 
what is a pi whale and how to access one.
what is a pi whale and how to access one.what is a pi whale and how to access one.
what is a pi whale and how to access one.DOT TECH
 
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...Amil Baba Dawood bangali
 
how can I sell my mined pi coins profitabily.
how can I sell my mined pi coins profitabily.how can I sell my mined pi coins profitabily.
how can I sell my mined pi coins profitabily.DOT TECH
 
How can I sell my pi coins in Indonesia?
How can I  sell my pi coins in Indonesia?How can I  sell my pi coins in Indonesia?
How can I sell my pi coins in Indonesia?DOT TECH
 
how can I sell my pi coins in China 2024.
how can I sell my pi coins in China 2024.how can I sell my pi coins in China 2024.
how can I sell my pi coins in China 2024.DOT TECH
 
how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.DOT TECH
 
how to sell pi coins on Bitmart crypto exchange
how to sell pi coins on Bitmart crypto exchangehow to sell pi coins on Bitmart crypto exchange
how to sell pi coins on Bitmart crypto exchangeDOT TECH
 
how can I transfer pi coins to someone in a different country.
how can I transfer pi coins to someone in a different country.how can I transfer pi coins to someone in a different country.
how can I transfer pi coins to someone in a different country.DOT TECH
 
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理ydubwyt
 
Isios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdfIsios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdfHenry Tapper
 
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...Vighnesh Shashtri
 
The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...Antonis Zairis
 
9th issue of our inhouse magazine Ingenious May 2024.pdf
9th issue of our inhouse magazine Ingenious May 2024.pdf9th issue of our inhouse magazine Ingenious May 2024.pdf
9th issue of our inhouse magazine Ingenious May 2024.pdfAnkur Shah
 
how can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYChow can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYCDOT TECH
 

Recently uploaded (20)

Latino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino CaucusLatino Buying Power - May 2024 Presentation for Latino Caucus
Latino Buying Power - May 2024 Presentation for Latino Caucus
 
Webinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont BraunWebinar Exploring DORA for Fintechs - Simont Braun
Webinar Exploring DORA for Fintechs - Simont Braun
 
when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.when officially can i withdraw my pi Network coins.
when officially can i withdraw my pi Network coins.
 
PD ARRAY THEORY FOR INTERMEDIATE (1).pdf
PD ARRAY THEORY FOR INTERMEDIATE (1).pdfPD ARRAY THEORY FOR INTERMEDIATE (1).pdf
PD ARRAY THEORY FOR INTERMEDIATE (1).pdf
 
USDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptxUSDA Loans in California: A Comprehensive Overview.pptx
USDA Loans in California: A Comprehensive Overview.pptx
 
Introduction to Economics II Chapter 25 Production and Growth.pdf
Introduction to Economics II Chapter 25 Production and Growth.pdfIntroduction to Economics II Chapter 25 Production and Growth.pdf
Introduction to Economics II Chapter 25 Production and Growth.pdf
 
what is a pi whale and how to access one.
what is a pi whale and how to access one.what is a pi whale and how to access one.
what is a pi whale and how to access one.
 
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
NO1 Uk Divorce problem uk all amil baba in karachi,lahore,pakistan talaq ka m...
 
how can I sell my mined pi coins profitabily.
how can I sell my mined pi coins profitabily.how can I sell my mined pi coins profitabily.
how can I sell my mined pi coins profitabily.
 
How can I sell my pi coins in Indonesia?
How can I  sell my pi coins in Indonesia?How can I  sell my pi coins in Indonesia?
How can I sell my pi coins in Indonesia?
 
how can I sell my pi coins in China 2024.
how can I sell my pi coins in China 2024.how can I sell my pi coins in China 2024.
how can I sell my pi coins in China 2024.
 
how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.how can i use my minded pi coins I need some funds.
how can i use my minded pi coins I need some funds.
 
how to sell pi coins on Bitmart crypto exchange
how to sell pi coins on Bitmart crypto exchangehow to sell pi coins on Bitmart crypto exchange
how to sell pi coins on Bitmart crypto exchange
 
how can I transfer pi coins to someone in a different country.
how can I transfer pi coins to someone in a different country.how can I transfer pi coins to someone in a different country.
how can I transfer pi coins to someone in a different country.
 
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理
一比一原版BCU毕业证伯明翰城市大学毕业证成绩单如何办理
 
Isios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdfIsios-2024-Professional-Independent-Trustee-Survey.pdf
Isios-2024-Professional-Independent-Trustee-Survey.pdf
 
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
Empowering the Unbanked: The Vital Role of NBFCs in Promoting Financial Inclu...
 
The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...The new type of smart, sustainable entrepreneurship and the next day | Europe...
The new type of smart, sustainable entrepreneurship and the next day | Europe...
 
9th issue of our inhouse magazine Ingenious May 2024.pdf
9th issue of our inhouse magazine Ingenious May 2024.pdf9th issue of our inhouse magazine Ingenious May 2024.pdf
9th issue of our inhouse magazine Ingenious May 2024.pdf
 
how can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYChow can I sell pi coins after successfully completing KYC
how can I sell pi coins after successfully completing KYC
 

Python Finance

  • 1. Using Pandas,Numpy calculate stock statics and HPY WI258@NAVER.COM
  • 2. First need to know concept Python concept and code Pandas (data refinement package) Numpy (data array and statics package) statistics and HPY formula
  • 3. statistics and HPY formula mean : HPY(HPR) : variance : standard deviation:
  • 4. Import stock data and refinement First download stock file on yahoo. And then refine Date, Open , Close Data, Print it In second one have loc function . Loc function refine line data
  • 5. mean , standard deviation , variance Using Numpy statistic function calculate statistics value.
  • 6. Numpy statistics function 함수 np.sum Calculate data sum np.mean Calculate data mean np.std Calculate data standard deviation np.var Calculate data variance np.min , np.max Calculate data minium and maxium np.argmin, np.argmax Calculate data aggregate minium and maxium np.cumsum Calculate every data cumulative sum(from 0 increasing) np.cumprod Calculate every data cumulative multiply(from 1 multiplying)
  • 7. Calculate HPY First enter HPY formula and then print function. But in data no Date, so need to refine Date data
  • 8. Finally, will combine two date. For combining two data, will use DataFrame function. Because DataFrame use for two-dimentional matrix. If just have just one data, it is first two-dimentional matrix.
  • 10. Thank you ! If have problem, please send to me email