Installation of the R language TTR package

Source: Internet
Author: User

R language is a statistical language, mainly used in mathematical modeling, statistical calculation, data processing, visualization and other directions, R language is inherently different from other programming languages. The R language encapsulates the computational functions of a variety of basic disciplines, and we only need to invoke these computational functions in the programming of the R language to build a complex mathematical model for different fields and businesses.

First, the role

1. The purpose of the TTR package is to construct the functions of technical analysis and other technical trading rules in R. TTR can be found in Cran, the current version number is 0.22 (update 2013-3-18).

TTR Current function is to provide some common technical analysis indicators of the function, can be divided into the following categories:
Moving average
Trend detection and strength
Oscillator Index

Volatility Index Volume analysis

Reference: Building R-based trading Systems (3) TTR,http://site.douban.com/182577/widget/notes/10568316/note/299629860/

2. Functions commonly used in TTR

The SMA () function in the R's "TTR" package can smooth the time series data with a simple moving average.

Reference:R language Time series analysis , http://wenku.baidu.com/link?url=ejwsbRrNbml8CDJc29EtpUv5HSPet9YjzecO_ Cfvhoozlhrys9c40nl3kzwwmz7ku4pna4qzblrxwwqsl7ssfjah9q90f7pllmeelzl41wa

Second, installation

Installation is actually very simple, a total of three steps. The first step: set the mirror site of the download package; The second step: Select the Cran Warehouse; step three: Find the TTR package in alphabetical order, click OK, wait a moment, download, install complete.

1, set the download package mirror site, the general choice of China (Hefei). May have a site in China University of Science and technology, other sites have not tried. Menu: Set Cran image with package.


2, select the Cran warehouse and extension library, the default is selected.


3, find TTR package point determination, its automatic completion of the download and installation of the package.


If there is no error, then the TTR package is installed. You can use the command:

Library ("TTR")

Load the TTR package.



Installation of the R language TTR package

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.