我编写了这个脚本来绘制历史财务数据:
open FSharp.Data
#load "C:\Users\Nick\Documents\Visual Studio 2013\Projects\TryFsharp\packages\FSharp.Charting.0.90.9\FSharp.Charting.fsx"
open FSharp.Charting
open System
let plotprice nasdaqcode =
let url = "http://ichart.finance.yahoo.com/table.csv?s="+nasdaqcode
let company = CsvFile.Load(url)
let companyPrices = [ for r in company.Rows -> r.GetColumn "Date", r.GetColumn "Close" ]
(companyPrices
|> List.sort
|> Chart.Line).WithTitle(nasdaqcode, InsideArea=false)
plotprice "MSFT"
plotprice "ORCL"
plotprice "GOOG"
plotprice "NTES"
这很好用。
问题:
有些数据是从 1986 年开始的,有些是从 2000 年开始的。我想绘制从 2000 年到 2015 年的数据。如何选择这个时间段?
鼠标悬停在图表上时是否可以显示时间?