# "Quantitative investment: Matlab as a Tool" series (1) Basics-----minute learning matlab (UP)

Source: Internet
Author: User

"Quantitative investment: to MATLAB for the tool "serial (1) Basic Article - N minutes Learn MATLAB (UP)

"Quantitative investment: to MATLAB Introduction to Tools

"Quantitative investment: Matlab As a tool" is a flagship subsidiary of the Electronics Industry publishing House (Phei), Beijing Bowen Point of View Information Co., Ltd. published by the "Quantitative Investment and hedge fund series," a series of editors for Dr. Dingpeng, "quantitative investment: Matlab as a tool" Authored by Li Yang (faruto) and Cheeyong (Ariszheng), this paper mainly introduces the specific application of MATLAB in quantitative investment. The book is expected to be listed in October 2014, welcome to the support of all. Before the listing of books, the Chinese Institute of Quantitative Investment will be in a series of network platform to introduce, convenient for readers to get a glimpse of the book summary.

"Quantitative investment: using MATLAB for Tools (1) Basic article-n minutes to learn matlab (UP)

Introduction

The reason is to use the Q&a form below as the "quantitative investment: Matlab as a tool" foundation, is to let the reader just contact with MATLAB can quickly and effectively understand Matlab, after all, in a time-efficient era of people prefer to crash things.

This article formally refers to the Liu Sixian teacher's "153 minutes to learn R", of course, the content of the combination of the characteristics of MATLAB itself, the content of this article from a variety of sources, both from the official help of MATLAB documents, but also from my personal summary, there are some from the MATLAB Technical Forum (HTTP ://www.matlabsky.com) Discussion issues.

MATLAB is a very large system, its official toolbox there are dozens of kinds of internal functions have hundreds of, it can be said that learning Matlab is an endless thing.

Want to contact Matlab has been nearly 10 years of time, in the learning of Matlab on the road to contact a lot of like-minded friends, hope this simple "n minutes to learn matlab (60" Can become you know, learn matlab good assistant.)

Li Yang (faruto)

Basic knowledge

(1) What does MATLAB do? Why is matlab called Matlab?

MATLAB is the commercial mathematics software produced by American MathWorks Company, which is used in the advanced Technical Computing language and interactive environment for algorithm development, data visualization, data analysis and numerical calculation, mainly including MATLAB and Simulink.

MATLAB is a combination of the matrix and laboratory two words, meaning The Matrix factory (Matrix Lab), the reason is called The Matrix Factory (Matrix Lab), because the basic data unit of MATLAB is the matrix.

(2) who is the founder of MathWorks company?

Cleve Moler and Jack Little are the founders of MathWorks Corporation. Cleve Moler is the first developer of Matlab, and Jack Little is the co-developer and chief architect of the early versions of the Signal Processing Toolbox and Control Systems Toolkit.

(3) I am a novice, how do I start to learn matlab?

If your English reading is OK, then the official MATLAB Help document will be the best and most comprehensive learning materials, you can call the MATLAB command window by typing "Doc" to bring up the official MATLAB help document, Alternatively, you can view the online MATLAB official help document in the Documentation Center (http://www.mathworks.cn/cn/help/documentation-center.html) of the MathWorks company's official website.

In addition MathWorks Company's official website of the User Center (http://www.mathworks.cn/matlabcentral/) There are some MATLAB related issues and some Matlab Daniel Blog, including Cleve Moler's blog--cleve ' s Corner (Http://blogs.mathworks.com/cleve), in the MATLAB User Center you can learn matlab.

MATLAB Technology Forum (http://www.matlabsky.com) is a good learning of MATLAB Chinese site, one of the author Li Yang (faruto) is a member of the MATLAB Technology Forum Core Management team, in this forum you can find a lot of learning materials (code, data, Video, etc.) or directly ask questions to discuss with you.

Of course, you can also buy some MATLAB-related Chinese and foreign text books to learn.

(4) Does MATLAB require a lot of programming skills?

Most of the time is not needed, because MATLAB has a lot of functions and toolboxes, the official toolbox has dozens of, the third-party toolbox countless and daily increase, you use the general methods and functions can be found in the MATLAB Toolbox.

(5) Can you give a simple example of MATLAB?

Generate 100 Gaussian (normal) distribution random numbers, and characterize these 100 numbers.

Matlab code

Mean_value = 0;

Std_value = 1;

Data_num = 100;

x = Random (' Normal ', Mean_value, Std_value, Data_num, 1);

X_dataset = DataSet (x);

Whos

Mean_x = mean (x)

std_x = STD (x)

Summary (X_dataset)

The result of the run (because a random number is generated, multiple runs may be different.) ）

Name Size Bytes Class Attributes

Data_num 1x1 8 Double

Mean_value 1x1 8 Double

Std_value 1x1 8 Double

X 100x1 Double

X_dataset 100x1 2300 DataSet

mean_x =

-0.0684

std_x =

0.9568

x: [100x1 Double]

Min 1st quartile median 3rd quartile Max

-2.8216-0.7437-0.088884 0.63638 2.3738

(6) How to view the version information and memory information of MATLAB used?

To view the MATLAB version information and memory information that you are using by typing "version" and "Memories" in the command window in MATLAB.

Running results (depending on the MATLAB version and the computer configuration, the results may vary.) ）

>> version

Ans =

7.14.0.739 (R2012A)

>> Memory

Maximum possible array:444 MB (4.659e+08 bytes) *

Memory available for all arrays:1190 MB (1.248e+09 bytes) * *

Memory used by matlab:427 MB (4.476e+08 bytes)

Physical Memory (RAM): 3327 MB (3.489e+09 bytes)

* Limited by contiguous virtual address space available.

* * Limited by virtual address space available.

(7) Does MATLAB support Chinese?

Support! However, in MATLAB, a considerable part of the toolbox of the authors are English-speaking, it is recommended to be proficient in the English language environment.

(8) MATLAB Support auto-complete (Tab completion)?

Support! In the newer version, MATLAB introduced the command auto-completion function, using the TAB key to automatically complete the MATLAB command or give a list of all possible completion commands.

(9) What are the common hotkeys for MATLAB?

MATLAB In addition to support common Windows Hotkeys (copy: Ctrl + C, cut: ctrl+x, paste: ctrl+p, etc.), in the Matlab file Editor (editor), there are some of the following common hotkeys:

F5: Run the current m file;

F9: Run the selected code snippet;

Ctrl+r: Note the selected code snippet;

Ctrl+t: Anti-Comment selected code snippet;

Ctrl+i: Smart indent adjustment for the selected code snippet.

(10) How do I clear a variable?

Use the clear command to clear all variables in the workspace (Workspace), clear the variable with the name of the workspace (Workspace), and use the clear name command.

(11) How do I empty the command window?

Use the CLC command to empty the command window.

What are the data types commonly used in MATLAB?

The basic data types supported by MATLAB are basic numeric types, strings, cell arrays, structs, function handles, Java objects, logical types, and so on.

The basic numeric types include the basic numeric types, including the double type, the single precision type, the integer type, and so on.

(13) How do I see the code of a function?

The Matlab file Editor (editor) menu bar can use File->open directly open the relevant m file to view the source code, or you can just open with the edit function, such as

Edit mean;

will open the mean function directly mean view the source code:

Function y = mean (X,dim)

%mean Average or MEAN value.

% for vectors, MEAN (x) was the MEAN value of the elements in X. for

% matrices, MEAN (X) is a row vector containing the MEAN value of

% each column. For n-d arrays, MEAN (X) is the MEAN value of the

% elements along the first Non-singleton dimension of X.

%

% MEAN (X,dim) takes the MEAN along the dimension DIM of X.

%

% example:if X = [1 2 3; 3 3 6; 4 6 8; 4 7 7];

%

% then mean (x,1) is [3.0000 4.5000 6.0000] and

% mean (x,2) is [2.0000 4.0000 6.0000 6.0000]. '

%

% Class support for input X:

% Float:double, single

%

% Copyright 1984-2009 the MathWorks, Inc.

% \$Revision: 5.17.4.5 \$ \$Date: 2010/09/02 13:35:22 \$

If Nargin==1,

% determine which dimension SUM would use

Dim = Find (Size (x) ~=1, 1);

If IsEmpty (Dim), Dim = 1; End

y = SUM (x)/size (X,dim);

Else

y = SUM (X,dim)/size (X,dim);

End

Can I use scientific notation in MATLAB ?

OK.

1e10 = 1000000000

1.2e-4 = 0.00012

The book is expected to go public in October 2014.

Book Exchange Forum: MATLAB Technology Forum Reading Channel "quantitative investment: Matlab as a tool" version, address: http://www.matlabsky.com/forum-112-1.html

"Quantitative investment: using MATLAB the basics of tools- N minutes Learn MATLAB documents, code, data

"Quantitative investment: Matlab as a tool" basic part (n minutes to learn MATLAB) related documents, code, data has been completely free open source sharing, welcome to download.

Baidu Network Disk:

Li Yang (faruto), member of expert committee of China Quantitative Investment Association, co-founder of MATLAB Technology Forum (www.matlabsky.com), Master of Applied Mathematics, Beijing Normal University, has worked in the private equity, futures companies, insurance companies, and engaged in quantitative investment related work. Ten years of experience in MATLAB programming, machine learning, quantitative investment and other related fields have in-depth research, has published "Matlab Neural network 30 Case Analysis" and "Matlab Neural network 43 Case Analysis" and other books.

Email: [Email protected]

Weibo: Http://weibo.com/faruto

Cheeyong (Ariszheng), member of the Expert committee of China Quantitative Investment Association, founder of Fubon Fund product director, Master of Operations Research and Cybernetics, Beijing Polytechnic University, has worked in China Galaxy Securities, Silver Wah Fund, founder Fubon Fund, engaged in financial product research and design. More than 10 years of experience in MATLAB programming, focusing on product design, quantitative investment and other related fields of research, especially for a variety of structured products, tiered fund products have in-depth research, has published "Operational Research and optimization of MATLAB programming" and "Financial Quantitative Analysis: MATLAB Programming" and other books.

Email: [Email protected]

Weibo: Http://weibo.com/ariszheng

"Quantitative investment: Matlab as a Tool" series (1) Basics-----minute learning matlab (UP)

Related Keywords:

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.