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

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
主站蜘蛛池模板: 会泽县| 房山区| 通化市| 阿图什市| 马尔康县| 望奎县| 得荣县| 无极县| 九寨沟县| 准格尔旗| 海门市| 大英县| 花莲县| 桂林市| 衢州市| 象州县| 苍溪县| 花垣县| 双鸭山市| 萝北县| 锡林浩特市| 会东县| 丹江口市| 松滋市| 廉江市| 信丰县| 三河市| 阿克| 霍城县| 阿拉尔市| 尼木县| 布拖县| 玉山县| 通江县| 四会市| 饶阳县| 厦门市| 扎鲁特旗| 丁青县| 探索| 从化市|