금융 분야에서 보게 되는 가장 중요한 데이터 유형은 날짜나 시간으로 인덱스된 데이터인 금융
시계열 데이터다. 예를 들어 주식의 가격은 금융 시계열 데이터다. 마찬가지로 달러-유로 환율
도 금융 시계열 데이터다. 하나의 환율값은 짧은 시간 동안 유지되고 이러한 값이 모이면 환율
의 시계열 데이터가 된다.
시간을 중요 요소로 고려하지 않는 금융 분야는 존재하지 않는다. 물리학이나 다른 과학 분야
에서도 마찬가지다. 파이썬에서 시계열 데이터를 다루기 위한 도구로 가장 많이 사용되는 것은
pandas
라이브러리다.
pandas
의 창시자 중 한 명인 웨스 맥키니
Wes
McKinney
는
AQR
캐피탈 매
니지먼트라는 대형 헤지펀드의 애널리스트로 일하면서 이 라이브러리를 개발하기 시작했다.
따라서
pandas
는 그 근본부터 금융 시계열 데이터를 다루기 위해 설계된 것이라 해도 무방
하다.
이 장은
CSV
형식으로 된 두 가지 금융 시계열 데이터에 기반하여 진행한다. 진행 순서는 다음
과 같다.
금융 데이터
pandas
를 사용하여 금융 시계열 데이터로 하는 기본적인 작업인 데이터 임포트, 요약 통계 도
출, 시간에 따른 변동치 계산, 리샘플링
resampling ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.