官术网_书友最值得收藏!

Handling and Manipulating Date, Time, and Time Series Data

Time series data is ubiquitous when it comes to algorithmic trading. So, handling, managing, and manipulating time series data is essential to performing algorithmic trading successfully. This chapter has various recipes that demonstrate how algorithmic trading can be done using the Python standard library and pandas, which is a Python data analysis library.

For our context, time series data is a series of data consisting of equally spaced timestamps and multiple data points describing trading data in that particular time frame. 

When handling time series data, the first thing you should know is how to read, modify, and create Python objects that understand date and time. The Python standard library includes the datetime module, which provides the datetime and timedelta objects, which can handle everything about the date and time. The first seven recipes in this chapter talk about this module. The remainder of this chapter talks about handling time series data using the pandas library, which is a very efficient library for data analysis. The pandas.DataFrame class will be used in our recipes.

The following is a list of the recipes in this chapter: 

  • Creating datetime objects
  • Creating timedelta objects
  • Operations on datetime objects
  • Modifying datetime objects
  • Converting a datetime to a string
  • Creating a datetime object from a string
  • The datetime object and time zones
  • Creating a pandas.DataFrame object
  • DataFrame manipulation—renaming, rearranging, reversing, and slicing
  • DataFrame manipulation—applying, sorting, iterating, and concatenating
  • Converting a DataFrame into other formats
  • Creating a DataFrame from other formats
主站蜘蛛池模板: 习水县| 鄂尔多斯市| 丹阳市| 讷河市| 吉木萨尔县| 新巴尔虎右旗| 榕江县| 禹城市| 台湾省| 甘孜县| 泗水县| 三穗县| 斗六市| 应城市| 忻州市| 莱西市| 密云县| 繁昌县| 仁化县| 弥勒县| 民丰县| 阿图什市| 远安县| 阳谷县| 思茅市| 措美县| 玉屏| 阜阳市| 松江区| 威远县| 南投县| 陵川县| 隆尧县| 福贡县| 永川市| 清丰县| 镇赉县| 冀州市| 同仁县| 永靖县| 洪雅县|