"Python Financial Data Analysis" records

Source: Internet
Author: User
Tags numba

This article records some of the knowledge that appears in the book, convenient to use when the query. Implied volatility rate

The implied volatility is the value of those fluctuations in the price of different options and the market quotations measured on the maturity date under other conditions unchanged.
In this case, the implied volatility is not the input parameter of the model/formula, but the result of a digital optimization process of the Formula 4.1 basic data structure:
The Python integer can be arbitrarily large, and the interpreter simply uses the desired bit/byte representation value.

A = 10000
 a.bit_length ()   #结果为17位
 term = 10**100
 term.bit_lengt ()  #结果为333位

String



Dictionary

Matplotlib Visualization:


6.1 Pandas
Data_range function

Freq Parameter Select value

Plot method (pandas on Matplotplib interface)


Processing method of pandas corresponding time slice

>>> index = pd.date_range (' 1/1/2000 ', periods=9, freq= ' T ') >>> series = PD.    Series (Range (9), Index=index) >>> Series 2000-01-01 00:00:00 0 2000-01-01 00:01:00 1 2000-01-01 00:02:00     2 2000-01-01 00:03:00 3 2000-01-01 00:04:00 4 2000-01-01 00:05:00 5 2000-01-01 00:06:00 6 2000-01-01 00:07:00 
7 2000-01-01 00:08:00 8 freq:t, Dtype:int64 #以三分钟为时间片统计 Cumulative sum of data per three minutes >>> series.resample (' 3T '). SUM () 2000-01-01 00:00:00 3 2000-01-01 00:03:00 2000-01-01 00:06:00, freq:3t #向下填充获得每分钟的数据累计和 Dtype:int64 Sample (rule = ' 1min '). Ffill () 2000-01-01 00:00:00 3 2000-01-01 00:01:00 3 2000-01-01 00:02:00 3 2000-01-01 00: 03:00 2000-01-01 00:04:00 2000-01-01 00:05:00 a 2000-01-01 00:06:00 freq:t, Dtype:int64 

High Performance Python
Because Python is too dynamic, it is not fast to compute science, so there are three ways to accelerate: Numba,pypy,cython.
1. Numba
The full name of the JIT is Just-in-time, in the Numba inside refers to Just-in-time compilation (Just-in-time compilation). Numba does not support list expressions, and its advantage is that it is effortless to apply the method to any function.

http://m.blog.csdn.net/hl541867329/article/details/75637324

http://blog.csdn.net/seekiu/article/details/46730951

2.Cython
3.pypy

https://www.zhihu.com/question/24695645?sort=created

4.GPU

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.