Skip to Content
数据科学实战手册
book

数据科学实战手册

by Posts & Telecom Press, Tony Ojeda, Sean Patrick Murphy, Bengfort Benjamin
May 2024
Intermediate to advanced
357 pages
5h 3m
Chinese
Packt Publishing
Content preview from 数据科学实战手册

第4章 建模分析股票市场数据(R)

本章中将涉及以下几点。

  • 获取股票市场数据
  • 描述数据
  • 清洗和研究数据
  • 形成相对估值法
  • 分析历史价格筛选股票

本章将引导你参与一个财务分析项目,通过分析股票市场数据,判断股市是被高估还是被低估,从而识别出有效投资的目标股票列表,并对目标股票的历史价格进行可视化分析。

我们必须指出,本章的目标不是让你成为股市分析方面的专家,或者帮你致富。华尔街量化投资分析师研究的模型,明显比我们在这里接触到的更为复杂。很多书整本都在讲解股市模型和金融工程,而我们只有一个章节来阐述这个问题。因此,受时间和格式所限,本章主要目标如下。

  • 对我们将要分析的数据有一个基本了解
  • 找到有效地对这些数据进行分析和建模的方法
  • 如何利用数据科学工具和方法对这些数据进行分析

本章用到的当前数据来源于finviz.com网站,而股票历史价格数据则通过Yahoo财经日报获得。

和前几章类似,本项目也采用R统计语言作为最重要的分析工具。可能你已经注意到,R有很多功能强大的程序包帮助我们完成分析任务;本章将用到其中的部分程序包。此外,本章中依然遵循数据科学项目实现流程,但会因为处理不同的数据类型和任务类型而适当修改流程。

为了完成本章的数据科学项目,你需要一个可以访问互联网的计算机,并且这台计算机上已经安装了R语言和以下包。

install.packages("XML") install.packages("ggplot2") install.packages("plyr") install.packages("reshape2") install.packages("zoo") library(XML) library(ggplot2) library(plyr) library(reshape2) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano
软件开发实践:项目驱动式的Java开发指南

软件开发实践:项目驱动式的Java开发指南

Raoul-Gabriel Urma, Richard Warburton
编写整洁的Python代码(第2版)

编写整洁的Python代码(第2版)

Posts & Telecom Press, Mariano Anaya

Publisher Resources

ISBN: 9781836206774