In the TranscriptParsing.fsx
script, we downloaded earnings call transcripts,
ticker and exchange information, and even the exact date and time of each earnings call.
Ok great, now what ?
In finance, a growing body of literature is concerned with applying
state of the art text-mining techniques on textual data with the objective
of conducting sentiment analysis. Such analysis is often conducted using
statistical learning methods such as supervised and unsupervised learning.
The key difference between these sets of methods/algorithms lies within their purpose.
While supervised learning is used for solving the task of prediction,
unsupervised learning is used for other tasks such as data inference.
Additionally, as the names suggest, while supervised learning algorithms
learn by working with labeled datasets, unsupervised learning
algorithms do not. For this very reason, it is often the case that, when compared
to unsupervised learning, supervised learning techniques are regarded as
less complex and more "trustworthy".
Here are some examples:
-
Supervised learning: Support vector machine, Neural network, Linear and logistics regression,
random forest, and Classification trees.
- Unsupervised learning: K-means, Hierarchical clustering, Principal Component Analysis (PCA)
In the case of the earnings calls dataset that we formed by parsing motley fool,
we can label each call according to the realized returns around the time of the
earnings call. We can then use these returns as a proxy that indicates the overall
"sentiment" of each call. The literature refers to these returns as the Earnings Announcement
Return, or EAR. From EAR, we can proceed to define or label each earnings calls as
being either "Positive" or "Negative". The EAR any given firm (stock) is simply its
abnormal return over a three day window centered on the earnings announcement.
open System
Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
#load "Types.fsx"
#load "Common.fsx"
#r "nuget: FSharp.Data"
#r "nuget: Plotly.NET, 2.0.0-preview.6"
if false then
let tiingoKey = System.Environment.GetEnvironmentVariable "TIINGO_API_KEY"
()
open Types
open Common
open Common.Tiingo
open Newtonsoft.Json
open Plotly.NET
fsi.AddPrinter<DateTime>(fun dt -> dt.ToString("s"))
/// JSON data reader
let readEarningsCallJson (jsonFile: string) =
IO.File.ReadAllText(jsonFile)
|> fun json -> JsonConvert.DeserializeObject<array<EarningsCall>>(json)
/// Calls data
let myCalls =
[|
"data-cache/EarningsCall2018.json"
"data-cache/EarningsCall2019.json"
"data-cache/EarningsCall2020.json"
"data-cache/EarningsCall2021.json"
|]
|> Array.collect readEarningsCallJson
|> Array.sortBy (fun xs -> xs.CallId.Date)
let callsByTimeOfDay (calls : EarningsCall []) =
calls
|> Array.countBy (fun xs -> xs.CallId.Date.Hour)
|> Array.sortBy (fun (hour, _) -> hour)
|> Chart.Column
|> Chart.withTitle $"Earnings Calls by time of day (N: {Seq.length calls})"
|> Chart.withX_AxisStyle "Hour"
|> Chart.withY_AxisStyle "Count"
myCalls |> callsByTimeOfDay |> Chart.Show
No value returned by any evaluator
|
Provided that Tiingo supports the ticker we are looking for, we can use
the Tiingo
module from Common.fsx
to download ticker related data such
as closing price and volume. Since we might be interested in analyzing the
stock's movement following the earnings call we'll fetch data up until 60 days
after each call. We can use this same 60 day window of ticker observations to
compute the EAR for each call.
/// Tiingo data
let tiingoWindow (tiingoStart: DateTime)
(tiingoEnd: DateTime)
(ticker: string) =
let checkObs obs =
match obs with
| [||] -> None
| _ -> Some obs
ticker
|> Tiingo.request
|> Tiingo.startOn tiingoStart
|> Tiingo.endOn tiingoEnd
|> Tiingo.get
|> checkObs
let calcReturn pv fv =
(fv / pv) - 1.0
let getReturnObs (ticker: string) (obs: TiingoObs []) =
obs
|> Seq.pairwise
|> Seq.map (fun (yesterday, today) ->
{ Symbol = ticker
Date = today.Date
Return = calcReturn (float yesterday.AdjClose) (float today.AdjClose) })
|> Seq.toArray
let earBarPlot (ticker: string) =
myCalls
// Find first matching observation
|> Seq.tryFind (fun xs -> xs.CallId.Ticker = ticker)
|> Option.bind (fun call ->
tiingoWindow (call.CallId.Date.AddDays(-7.)) (call.CallId.Date.AddDays(7.)) ticker
|> fun xs ->
match xs with
| Some obs ->
getReturnObs ticker obs
// Plot
|> Array.map (fun xs -> xs.Date, xs.Return)
|> Chart.Bar
|> Chart.withTitle
$"{ticker} Earnings Call {call.CallId.Date} Q{call.CallId.FiscalQuarter.ToString()}"
|> Some
| None -> None)
let msftEarPlot = earBarPlot "MSFT"
msftEarPlot |> Option.map Chart.Show
No value returned by any evaluator
|
/// Sample range
let startSample, endSample =
myCalls
|> Seq.map (fun xs -> xs.CallId.Date)
|> fun dates ->
(Seq.min dates).AddDays(-10.), (Seq.max dates).AddDays(10.)
/// SP500 (SPY)
let spyObs =
let spyTicker = "SPY"
let getReturnsMap (tiingoObs: Tiingo.TiingoObs []) =
getReturnObs spyTicker tiingoObs
|> Array.map (fun xs -> xs.Date, xs)
|> Map
let checkSpy rets =
match rets with
| None -> failwith "why isn't Tiingo working"
| Some rets -> rets
spyTicker
|> tiingoWindow startSample endSample
|> checkSpy
|> getReturnsMap
Sometimes a call might happen on a friday or right before or after a long holiday.
In these particular case scenarios, we have to be extra careful when trying to find
our three-day return window.
Because we don't have a database with all the non-trading days of a given year,
instead of trying to match a three-day return window instantaneously, it is safer
if we work from a range of return observations and try to find our three-day return
window from there.
/// Three day return window
let findThreeDays (middleObs: ReturnObs) (rets: ReturnObs []): ReturnObs [] option =
rets
|> Seq.windowed 3
|> Seq.tryFind (fun retWindow ->
let middle = retWindow.[1]
middle.Date.Date = middleObs.Date.Date)
/// SPY returns window
let spyReturnsBetween (begWin: DateTime) (endWin: DateTime) =
let rec loop (date: DateTime) rets =
if date.Date <= endWin.Date then
match Map.tryFind date spyObs with
| Some spy -> loop (date.AddDays(1.0)) (spy::rets)
| None -> loop (date.AddDays(1.0)) rets
else rets
loop begWin []
/// Abnormal returns from three day window
let computeAdjReturns (stock : ReturnObs []) =
let begWin, endWin =
stock
|> Seq.sortBy (fun xs -> xs.Date)
|> Seq.map (fun xs -> xs.Date)
|> fun xs ->
(xs |> Seq.head), (xs |> Seq.last)
let cumRet rets =
(1.0, rets)
||> Seq.fold(fun acc ret -> acc*(1.0+ret))
let spy =
spyReturnsBetween begWin endWin
|> Seq.map (fun xs -> xs.Return)
|> cumRet
let stockRet =
stock
|> Seq.map(fun x -> x.Return)
|> cumRet
stockRet - spy
type Sentiment =
| Positive
| Negative
| Neutral
type EarningsAnnouncementReturn =
{ EarningsCall: EarningsCall
TiingoObs: Tiingo.TiingoObs []
Sentiment: Sentiment option
Ear: float option }
/// Find first observed return
let firstReturnAfterCall (call: EarningsCall) (returnObs: ReturnObs []) =
let date = call.CallId.Date
if date.Hour < 16 then date.Date
else date.Date.AddDays(1.0)
|> fun dateOfCall ->
returnObs
|> Seq.tryFind (fun xs -> xs.Date.Date >= dateOfCall.Date)
let computeEar (call: EarningsCall) (tiingoObs: Tiingo.TiingoObs []) =
let getAdjReturns middleObs returnObs =
match findThreeDays middleObs returnObs with
| Some threeDayWindow -> Some (computeAdjReturns threeDayWindow)
| None -> None
getReturnObs call.CallId.Ticker tiingoObs
|> fun retObs ->
firstReturnAfterCall call retObs
|> Option.bind (fun middleObs ->
getAdjReturns middleObs retObs)
let generateEar (call: EarningsCall) =
let tiingoWindow =
let flatDate = call.CallId.Date.Date
tiingoWindow (flatDate.AddDays(-10.0)) (flatDate.AddDays(70.0)) call.CallId.Ticker
match tiingoWindow with
| Some tiingoObs ->
// For now lets set Sentiment to None
Some { EarningsCall = call
TiingoObs = tiingoObs
Sentiment = None
Ear = computeEar call tiingoObs}
| None -> None
let tslaCall =
myCalls
|> Array.tryFind (fun xs -> xs.CallId.Ticker = "TSLA")
|> Option.bind generateEar
tslaCall |> Option.bind (fun xs -> xs.Ear)
module Async =
let ParallelThrottled xs = Async.Parallel(xs, 100)
let asyncCall (call: EarningsCall) =
let rec loop attempt n =
async {
try
return generateEar call
with e ->
if attempt > 0 then
do! Async.Sleep 2000 // Wait 2 seconds in case we're throttled.
return! loop (attempt - 1) n
else return! failwithf "Failed to request '%s'. Error: %O" call.CallId.Ticker e }
loop 10 call
let asyncCalls (calls: EarningsCall []) =
calls
|> Seq.map asyncCall
|> Async.ParallelThrottled
|> Async.RunSynchronously
|> Array.choose id
let getEarsByYear year =
myCalls
|> Array.filter (fun xs -> xs.CallId.Date.Year = year)
|> asyncCalls
let ears2018 = getEarsByYear 2018
let ears2019 = getEarsByYear 2019
let ears2020 = getEarsByYear 2020
let ears2021 = getEarsByYear 2021
let calls2018, calls2019, calls2020, calls2021 =
myCalls
|> fun xs ->
(xs |> Array.filter (fun xs -> xs.CallId.Date.Year = 2018)),
(xs |> Array.filter (fun xs -> xs.CallId.Date.Year = 2019)),
(xs |> Array.filter (fun xs -> xs.CallId.Date.Year = 2020)),
(xs |> Array.filter (fun xs -> xs.CallId.Date.Year = 2021))
calls2018.Length
ears2018.Length
calls2019.Length
ears2019.Length
calls2020.Length
ears2020.Length
calls2021.Length
ears2021.Length
let earToJson (fileName: string) (ears: EarningsAnnouncementReturn []) =
JsonConvert.SerializeObject(ears)
|> fun json -> IO.File.WriteAllText(fileName, json)
earToJson "data-cache/EarningsAnnouncementReturn2018.json" ears2018
earToJson "data-cache/EarningsAnnouncementReturn2019.json" ears2019
earToJson "data-cache/EarningsAnnouncementReturn2020.json" ears2020
earToJson "data-cache/EarningsAnnouncementReturn2021.json" ears2021
namespace System
type Environment =
static member Exit : exitCode: int -> unit
static member ExpandEnvironmentVariables : name: string -> string
static member FailFast : message: string -> unit + 1 overload
static member GetCommandLineArgs : unit -> string []
static member GetEnvironmentVariable : variable: string -> string + 1 overload
static member GetEnvironmentVariables : unit -> IDictionary + 1 overload
static member GetFolderPath : folder: SpecialFolder -> string + 1 overload
static member GetLogicalDrives : unit -> string []
static member SetEnvironmentVariable : variable: string * value: string -> unit + 1 overload
static member CommandLine : string
...
<summary>Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited.</summary>
property Environment.CurrentDirectory: string with get, set
<summary>Gets or sets the fully qualified path of the current working directory.</summary>
<exception cref="T:System.ArgumentException">Attempted to set to an empty string ("").</exception>
<exception cref="T:System.ArgumentNullException">Attempted to set to <see langword="null" />.</exception>
<exception cref="T:System.IO.IOException">An I/O error occurred.</exception>
<exception cref="T:System.IO.DirectoryNotFoundException">Attempted to set a local path that cannot be found.</exception>
<exception cref="T:System.Security.SecurityException">The caller does not have the appropriate permission.</exception>
<returns>The directory path.</returns>
val tiingoKey : string
Environment.GetEnvironmentVariable(variable: string) : string
Environment.GetEnvironmentVariable(variable: string, target: EnvironmentVariableTarget) : string
module Types
module Common
module Tiingo
from Common
namespace Newtonsoft
namespace Newtonsoft.Json
namespace Plotly
namespace Plotly.NET
Multiple items
[<Struct>]
type DateTime =
new : year: int * month: int * day: int -> unit + 10 overloads
member Add : value: TimeSpan -> DateTime
member AddDays : value: float -> DateTime
member AddHours : value: float -> DateTime
member AddMilliseconds : value: float -> DateTime
member AddMinutes : value: float -> DateTime
member AddMonths : months: int -> DateTime
member AddSeconds : value: float -> DateTime
member AddTicks : value: int64 -> DateTime
member AddYears : value: int -> DateTime
...
<summary>Represents an instant in time, typically expressed as a date and time of day.</summary>
--------------------
DateTime ()
(+0 other overloads)
DateTime(ticks: int64) : DateTime
(+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
(+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
(+0 other overloads)
val readEarningsCallJson : jsonFile:string -> EarningsCall array
JSON data reader
val jsonFile : string
Multiple items
val string : value:'T -> string
<summary>Converts the argument to a string using <c>ToString</c>.</summary>
<remarks>For standard integer and floating point values the and any type that implements <c>IFormattable</c><c>ToString</c> conversion uses <c>CultureInfo.InvariantCulture</c>. </remarks>
<param name="value">The input value.</param>
<returns>The converted string.</returns>
--------------------
type string = String
<summary>An abbreviation for the CLI type <see cref="T:System.String" />.</summary>
<category>Basic Types</category>
namespace System.IO
type File =
static member AppendAllLines : path: string * contents: IEnumerable<string> -> unit + 1 overload
static member AppendAllLinesAsync : path: string * contents: IEnumerable<string> * encoding: Encoding *?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendAllText : path: string * contents: string -> unit + 1 overload
static member AppendAllTextAsync : path: string * contents: string * encoding: Encoding *?cancellationToken: CancellationToken -> Task + 1 overload
static member AppendText : path: string -> StreamWriter
static member Copy : sourceFileName: string * destFileName: string -> unit + 1 overload
static member Create : path: string -> FileStream + 2 overloads
static member CreateText : path: string -> StreamWriter
static member Decrypt : path: string -> unit
static member Delete : path: string -> unit
...
<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary>
IO.File.ReadAllText(path: string) : string
IO.File.ReadAllText(path: string, encoding: Text.Encoding) : string
val json : string
type JsonConvert =
static member DeserializeAnonymousType<'T> : value: string * anonymousTypeObject: 'T -> 'T + 1 overload
static member DeserializeObject : value: string -> obj + 7 overloads
static member DeserializeXNode : value: string -> XDocument + 3 overloads
static member DeserializeXmlNode : value: string -> XmlDocument + 3 overloads
static member EnsureDecimalPlace : value: float * text: string -> string + 1 overload
static member EnsureFloatFormat : value: float * text: string * floatFormatHandling: FloatFormatHandling * quoteChar: char * nullable: bool -> string
static member PopulateObject : value: string * target: obj -> unit + 1 overload
static member SerializeObject : value: obj -> string + 7 overloads
static member SerializeObjectInternal : value: obj * type: Type * jsonSerializer: JsonSerializer -> string
static member SerializeXNode : node: XObject -> string + 2 overloads
...
<summary>
Provides methods for converting between .NET types and JSON types.
</summary>
<example><code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\SerializationTests.cs" region="SerializeObject" title="Serializing and Deserializing JSON with JsonConvert" /></example>
JsonConvert.DeserializeObject<'T>(value: string) : 'T
JsonConvert.DeserializeObject(value: string) : obj
JsonConvert.DeserializeObject<'T>(value: string, settings: JsonSerializerSettings) : 'T
JsonConvert.DeserializeObject<'T>(value: string, [<ParamArray>] converters: JsonConverter []) : 'T
JsonConvert.DeserializeObject(value: string, type: Type) : obj
JsonConvert.DeserializeObject(value: string, settings: JsonSerializerSettings) : obj
JsonConvert.DeserializeObject(value: string, type: Type, settings: JsonSerializerSettings) : obj
JsonConvert.DeserializeObject(value: string, type: Type, [<ParamArray>] converters: JsonConverter []) : obj
type 'T array = 'T []
<summary>Single dimensional, zero-based arrays, written <c>int[]</c>, <c>string[]</c> etc.</summary>
<remarks>Use the values in the <see cref="T:Microsoft.FSharp.Collections.ArrayModule" /> module to manipulate values
of this type, or the notation <c>arr.[x]</c> to get/set array
values.</remarks>
<category>Basic Types</category>
type EarningsCall =
{ CallId: CallId
Transcript: string [] }
val myCalls : EarningsCall []
Calls data
type Array =
interface ICollection
interface IEnumerable
interface IList
interface IStructuralComparable
interface IStructuralEquatable
interface ICloneable
new : unit -> unit
member Clone : unit -> obj
member CopyTo : array: Array * index: int -> unit + 1 overload
member GetEnumerator : unit -> IEnumerator
...
<summary>Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.</summary>
val collect : mapping:('T -> 'U []) -> array:'T [] -> 'U []
<summary>For each element of the array, applies the given function. Concatenates all the results and return the combined array.</summary>
<param name="mapping">The function to create sub-arrays from the input array elements.</param>
<param name="array">The input array.</param>
<returns>The concatenation of the sub-arrays.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
val sortBy : projection:('T -> 'Key) -> array:'T [] -> 'T [] (requires comparison)
<summary>Sorts the elements of an array, using the given projection for the keys and returning a new array.
Elements are compared using <see cref="M:Microsoft.FSharp.Core.Operators.compare" />.</summary>
<remarks>This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved.
For a stable sort, consider using <see cref="M:Microsoft.FSharp.Collections.SeqModule.Sort" />.</remarks>
<param name="projection">The function to transform array elements into the type that is compared.</param>
<param name="array">The input array.</param>
<returns>The sorted array.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
val xs : EarningsCall
EarningsCall.CallId: CallId
CallId.Date: DateTime
val callsByTimeOfDay : calls:EarningsCall [] -> GenericChart.GenericChart
val calls : EarningsCall []
val countBy : projection:('T -> 'Key) -> array:'T [] -> ('Key * int) [] (requires equality)
<summary>Applies a key-generating function to each element of an array and returns an array yielding unique
keys and their number of occurrences in the original array.</summary>
<param name="projection">A function transforming each item of the input array into a key to be
compared against the others.</param>
<param name="array">The input array.</param>
<returns>The result array.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
property DateTime.Hour: int with get
<summary>Gets the hour component of the date represented by this instance.</summary>
<returns>The hour component, expressed as a value between 0 and 23.</returns>
val hour : int
type Chart =
static member Area : x:seq<#IConvertible> * y:seq<#IConvertible> * ?Name:string * ?ShowMarkers:bool * ?Showlegend:bool * ?MarkerSymbol:Symbol * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:TextPosition * ?TextFont:Font * ?Dash:DrawingStyle * ?Width:float -> GenericChart + 1 overload
static member Bar : keys:seq<#IConvertible> * values:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart + 1 overload
static member BoxPlot : ?x:'a0 * ?y:'a1 * ?Name:string * ?Showlegend:bool * ?Color:string * ?Fillcolor:'a2 * ?Opacity:float * ?Whiskerwidth:'a3 * ?Boxpoints:Boxpoints * ?Boxmean:BoxMean * ?Jitter:'a4 * ?Pointpos:'a5 * ?Orientation:Orientation * ?Marker:Marker * ?Line:Line * ?Alignmentgroup:'a6 * ?Offsetgroup:'a7 * ?Notched:bool * ?NotchWidth:float * ?QuartileMethod:QuartileMethod -> GenericChart + 1 overload
static member Bubble : x:seq<#IConvertible> * y:seq<#IConvertible> * sizes:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?MarkerSymbol:Symbol * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:TextPosition * ?TextFont:Font * ?StackGroup:string * ?Orientation:Orientation * ?GroupNorm:GroupNorm * ?UseWebGL:bool -> GenericChart + 1 overload
static member Candlestick : open:seq<#IConvertible> * high:seq<#IConvertible> * low:seq<#IConvertible> * close:seq<#IConvertible> * x:seq<#IConvertible> * ?Increasing:Line * ?Decreasing:Line * ?WhiskerWidth:float * ?Line:Line * ?XCalendar:Calendar -> GenericChart + 1 overload
static member ChoroplethMap : locations:seq<string> * z:seq<#IConvertible> * ?Text:seq<#IConvertible> * ?Locationmode:LocationFormat * ?Autocolorscale:bool * ?Colorscale:Colorscale * ?Colorbar:Colorbar * ?Marker:Marker * ?GeoJson:'a2 * ?FeatureIdKey:string * ?Zmin:float * ?Zmax:float -> GenericChart
static member ChoroplethMapbox : locations:seq<#IConvertible> * z:seq<#IConvertible> * geoJson:'a2 * ?FeatureIdKey:string * ?Text:seq<#IConvertible> * ?Below:string * ?Colorscale:Colorscale * ?Colorbar:Colorbar * ?ZAuto:bool * ?ZMin:float * ?ZMid:float * ?ZMax:float -> GenericChart
static member Column : keys:seq<#IConvertible> * values:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart + 1 overload
static member Contour : data:seq<#seq<'a1>> * ?X:seq<#IConvertible> * ?Y:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?Opacity:float * ?Colorscale:Colorscale * ?Showscale:'a4 * ?zSmooth:SmoothAlg * ?Colorbar:'a5 -> GenericChart (requires 'a1 :> IConvertible)
static member DensityMapbox : lon:seq<#IConvertible> * lat:seq<#IConvertible> * ?Z:seq<#IConvertible> * ?Radius:float * ?Opacity:float * ?Text:seq<#IConvertible> * ?Below:string * ?Colorscale:Colorscale * ?Colorbar:Colorbar * ?Showscale:bool * ?ZAuto:bool * ?ZMin:float * ?ZMid:float * ?ZMax:float -> GenericChart + 1 overload
...
<summary>
Provides a set of static methods for creating charts.
</summary>
static member Chart.Column : keysvalues:seq<#IConvertible * #IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:StyleParam.TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart.GenericChart
static member Chart.Column : keys:seq<#IConvertible> * values:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:StyleParam.TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart.GenericChart
static member Chart.withTitle : title:string * ?Titlefont:Font -> (GenericChart.GenericChart -> GenericChart.GenericChart)
Multiple items
module Seq
from Plotly.NET
--------------------
module Seq
from Microsoft.FSharp.Collections
<summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Collections.seq`1" />.</summary>
val length : source:seq<'T> -> int
<summary>Returns the length of the sequence</summary>
<param name="source">The input sequence.</param>
<returns>The length of the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
static member Chart.withX_AxisStyle : title:string * ?MinMax:(float * float) * ?Showgrid:bool * ?Showline:bool * ?Side:StyleParam.Side * ?Overlaying:StyleParam.AxisAnchorId * ?Id:int * ?Domain:(float * float) * ?Position:float * ?Zeroline:bool * ?Anchor:StyleParam.AxisAnchorId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withY_AxisStyle : title:string * ?MinMax:(float * float) * ?Showgrid:bool * ?Showline:bool * ?Side:StyleParam.Side * ?Overlaying:StyleParam.AxisAnchorId * ?Id:int * ?Domain:(float * float) * ?Position:float * ?Zeroline:bool * ?Anchor:StyleParam.AxisAnchorId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.Show : ch:GenericChart.GenericChart -> unit
module GenericChart
from Plotly.NET
<summary>
Module to represent a GenericChart
</summary>
val toChartHTML : gChart:GenericChart.GenericChart -> string
<summary>
Converts a GenericChart to it HTML representation. The div layer has a default size of 600 if not specified otherwise.
</summary>
val tiingoWindow : tiingoStart:DateTime -> tiingoEnd:DateTime -> ticker:string -> TiingoObs [] option
Tiingo data
val tiingoStart : DateTime
val tiingoEnd : DateTime
val ticker : string
val checkObs : ('a [] -> 'a [] option)
val obs : 'a []
union case Option.None: Option<'T>
<summary>The representation of "No value"</summary>
union case Option.Some: Value: 'T -> Option<'T>
<summary>The representation of "Value of type 'T"</summary>
<param name="Value">The input value.</param>
<returns>An option representing the value.</returns>
val request : symbol:string -> TiingoRequest
<summary>Constructs a Tiingo request. By default is to get the past year of data.</summary>
<param name="symbol">The ticker symbol such as "AAPL","MSFT" etc.</param>
val startOn : startOn:DateTime -> request:TiingoRequest -> TiingoRequest
<summary>Sets the Tiingo request start date.</summary>
<param name="startOn">Request start date</param>
<param name="request">The Tiingo request to update.</param>
val endOn : endOn:DateTime -> request:TiingoRequest -> TiingoRequest
<summary>Sets the Tiingo request end date.</summary>
<param name="endOn">Request start date</param>
<param name="request">The Tiingo request to update.</param>
val get : request:TiingoRequest -> TiingoObs []
<summary>Downloads Tiingo data.</summary>
<param name="request">The Tiingo request to download.</param>
val calcReturn : pv:float -> fv:float -> float
val pv : float
val fv : float
val getReturnObs : ticker:string -> obs:TiingoObs [] -> ReturnObs []
val obs : TiingoObs []
type TiingoObs =
{ Date: DateTime
Close: decimal
High: decimal
Low: decimal
Open: decimal
Volume: int
AdjClose: decimal
AdjHigh: decimal
AdjLow: decimal
AdjOpen: decimal
... }
val pairwise : source:seq<'T> -> seq<'T * 'T>
<summary>Returns a sequence of each element in the input sequence and its predecessor, with the
exception of the first element which is only returned as the predecessor of the second element.</summary>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
val map : mapping:('T -> 'U) -> source:seq<'T> -> seq<'U>
<summary>Builds a new collection whose elements are the results of applying the given function
to each of the elements of the collection. The given function will be applied
as elements are demanded using the <c>MoveNext</c> method on enumerators retrieved from the
object.</summary>
<remarks>The returned sequence may be passed between threads safely. However,
individual IEnumerator values generated from the returned sequence should not be accessed concurrently.</remarks>
<param name="mapping">A function to transform items from the input sequence.</param>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
val yesterday : TiingoObs
val today : TiingoObs
TiingoObs.Date: DateTime
Multiple items
val float : value:'T -> float (requires member op_Explicit)
<summary>Converts the argument to 64-bit float. This is a direct conversion for all
primitive numeric types. For strings, the input is converted using <c>Double.Parse()</c>
with InvariantCulture settings. Otherwise the operation requires an appropriate
static conversion method on the input type.</summary>
<param name="value">The input value.</param>
<returns>The converted float</returns>
--------------------
[<Struct>]
type float = Double
<summary>An abbreviation for the CLI type <see cref="T:System.Double" />.</summary>
<category>Basic Types</category>
--------------------
type float<'Measure> =
float
<summary>The type of double-precision floating point numbers, annotated with a unit of measure.
The unit of measure is erased in compiled code and when values of this type
are analyzed using reflection. The type is representationally equivalent to
<see cref="T:System.Double" />.</summary>
<category index="6">Basic Types with Units of Measure</category>
TiingoObs.AdjClose: decimal
val toArray : source:seq<'T> -> 'T []
<summary>Builds an array from the given collection.</summary>
<param name="source">The input sequence.</param>
<returns>The result array.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
val earBarPlot : ticker:string -> GenericChart.GenericChart option
val tryFind : predicate:('T -> bool) -> source:seq<'T> -> 'T option
<summary>Returns the first element for which the given function returns True.
Return None if no such element exists.</summary>
<param name="predicate">A function that evaluates to a Boolean when given an item in the sequence.</param>
<param name="source">The input sequence.</param>
<returns>The found element or None.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
CallId.Ticker: string
module Option
from Microsoft.FSharp.Core
<summary>Contains operations for working with options.</summary>
<category>Options</category>
val bind : binder:('T -> 'U option) -> option:'T option -> 'U option
<summary><c>bind f inp</c> evaluates to <c>match inp with None -> None | Some x -> f x</c></summary>
<param name="binder">A function that takes the value of type T from an option and transforms it into
an option containing a value of type U.</param>
<param name="option">The input option.</param>
<example><code>
let tryParse input =
match System.Int32.TryParse input with
| true, v -> Some v
| false, _ -> None
None |> Option.bind tryParse // evaluates to None
Some "42" |> Option.bind tryParse // evaluates to Some 42
Some "Forty-two" |> Option.bind tryParse // evaluates to None
</code></example>
<returns>An option of the output type of the binder.</returns>
val call : EarningsCall
DateTime.AddDays(value: float) : DateTime
val xs : TiingoObs [] option
val map : mapping:('T -> 'U) -> array:'T [] -> 'U []
<summary>Builds a new array whose elements are the results of applying the given function
to each of the elements of the array.</summary>
<param name="mapping">The function to transform elements of the array.</param>
<param name="array">The input array.</param>
<returns>The array of transformed elements.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
val xs : ReturnObs
ReturnObs.Date: DateTime
ReturnObs.Return: float
static member Chart.Bar : keysvalues:seq<#IConvertible * #IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:StyleParam.TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart.GenericChart
static member Chart.Bar : keys:seq<#IConvertible> * values:seq<#IConvertible> * ?Name:string * ?Showlegend:bool * ?Color:string * ?Opacity:float * ?Labels:seq<#IConvertible> * ?TextPosition:StyleParam.TextPosition * ?TextFont:Font * ?Marker:Marker -> GenericChart.GenericChart
val msftEarPlot : GenericChart.GenericChart option
val map : mapping:('T -> 'U) -> option:'T option -> 'U option
<summary><c>map f inp</c> evaluates to <c>match inp with None -> None | Some x -> Some (f x)</c>.</summary>
<param name="mapping">A function to apply to the option value.</param>
<param name="option">The input option.</param>
<example><code>
None |> Option.map (fun x -> x * 2) // evaluates to None
Some 42 |> Option.map (fun x -> x * 2) // evaluates to Some 84
</code></example>
<returns>An option of the input value after applying the mapping function, or None if the input is None.</returns>
val startSample : DateTime
Sample range
val endSample : DateTime
Sample range
val dates : seq<DateTime>
val min : source:seq<'T> -> 'T (requires comparison)
<summary>Returns the lowest of all elements of the sequence, compared via <c>Operators.min</c>.</summary>
<param name="source">The input sequence.</param>
<returns>The smallest element of the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input sequence is empty.</exception>
val max : source:seq<'T> -> 'T (requires comparison)
<summary>Returns the greatest of all elements of the sequence, compared via Operators.max</summary>
<param name="source">The input sequence.</param>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input sequence is empty.</exception>
<returns>The largest element of the sequence.</returns>
val spyObs : Map<DateTime,ReturnObs>
SP500 (SPY)
val spyTicker : string
val getReturnsMap : (TiingoObs [] -> Map<DateTime,ReturnObs>)
val tiingoObs : TiingoObs []
Multiple items
module Map
from Microsoft.FSharp.Collections
<summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Collections.Map`2" />.</summary>
--------------------
type Map<'Key,'Value (requires comparison)> =
interface IReadOnlyDictionary<'Key,'Value>
interface IReadOnlyCollection<KeyValuePair<'Key,'Value>>
interface IEnumerable
interface IComparable
interface IEnumerable<KeyValuePair<'Key,'Value>>
interface ICollection<KeyValuePair<'Key,'Value>>
interface IDictionary<'Key,'Value>
new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
member Add : key:'Key * value:'Value -> Map<'Key,'Value>
member Change : key:'Key * f:('Value option -> 'Value option) -> Map<'Key,'Value>
...
<summary>Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default
comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values.</summary>
<remarks>See the <see cref="T:Microsoft.FSharp.Collections.MapModule" /> module for further operations on maps.
All members of this class are thread-safe and may be used concurrently from multiple threads.</remarks>
--------------------
new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
val checkSpy : ('a option -> 'a)
val rets : 'a option
val failwith : message:string -> 'T
<summary>Throw a <see cref="T:System.Exception" /> exception.</summary>
<param name="message">The exception message.</param>
<returns>The result value.</returns>
val rets : 'a
val findThreeDays : middleObs:ReturnObs -> rets:ReturnObs [] -> ReturnObs [] option
Three day return window
val middleObs : ReturnObs
type ReturnObs =
{ Symbol: string
Date: DateTime
Return: float }
val rets : ReturnObs []
type 'T option = Option<'T>
<summary>The type of optional values. When used from other CLI languages the
empty option is the <c>null</c> value. </summary>
<remarks>Use the constructors <c>Some</c> and <c>None</c> to create values of this type.
Use the values in the <c>Option</c> module to manipulate values of this type,
or pattern match against the values directly.
'None' values will appear as the value <c>null</c> to other CLI languages.
Instance methods on this type will appear as static methods to other CLI languages
due to the use of <c>null</c> as a value representation.</remarks>
<category index="3">Options</category>
val windowed : windowSize:int -> source:seq<'T> -> seq<'T []>
<summary>Returns a sequence that yields sliding windows containing elements drawn from the input
sequence. Each window is returned as a fresh array.</summary>
<param name="windowSize">The number of elements in each window.</param>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when windowSize is not positive.</exception>
val retWindow : ReturnObs []
val middle : ReturnObs
property DateTime.Date: DateTime with get
<summary>Gets the date component of this instance.</summary>
<returns>A new object with the same date as this instance, and the time value set to 12:00:00 midnight (00:00:00).</returns>
val spyReturnsBetween : begWin:DateTime -> endWin:DateTime -> ReturnObs list
SPY returns window
val begWin : DateTime
val endWin : DateTime
val loop : (DateTime -> ReturnObs list -> ReturnObs list)
val date : DateTime
val rets : ReturnObs list
val tryFind : key:'Key -> table:Map<'Key,'T> -> 'T option (requires comparison)
<summary>Lookup an element in the map, returning a <c>Some</c> value if the element is in the domain
of the map and <c>None</c> if not.</summary>
<param name="key">The input key.</param>
<param name="table">The input map.</param>
<returns>The found <c>Some</c> value or <c>None</c>.</returns>
val spy : ReturnObs
val computeAdjReturns : stock:ReturnObs [] -> float
Abnormal returns from three day window
val stock : ReturnObs []
val sortBy : projection:('T -> 'Key) -> source:seq<'T> -> seq<'T> (requires comparison)
<summary>Applies a key-generating function to each element of a sequence and yield a sequence ordered
by keys. The keys are compared using generic comparison as implemented by <see cref="M:Microsoft.FSharp.Core.Operators.compare" />.</summary>
<remarks>This function returns a sequence that digests the whole initial sequence as soon as
that sequence is iterated. As a result this function should not be used with
large or infinite sequences.
The function makes no assumption on the ordering of the original
sequence and uses a stable sort, that is the original order of equal elements is preserved.</remarks>
<param name="projection">A function to transform items of the input sequence into comparable keys.</param>
<param name="source">The input sequence.</param>
<returns>The result sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
val xs : seq<DateTime>
val head : source:seq<'T> -> 'T
<summary>Returns the first element of the sequence.</summary>
<param name="source">The input sequence.</param>
<returns>The first element of the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input does not have any elements.</exception>
val last : source:seq<'T> -> 'T
<summary>Returns the last element of the sequence.</summary>
<param name="source">The input sequence.</param>
<returns>The last element of the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input does not have any elements.</exception>
val cumRet : (seq<float> -> float)
val rets : seq<float>
val fold : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> 'State
<summary>Applies a function to each element of the collection, threading an accumulator argument
through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c>
then computes <c>f (... (f s i0)...) iN</c></summary>
<param name="folder">A function that updates the state with each element from the sequence.</param>
<param name="state">The initial state.</param>
<param name="source">The input sequence.</param>
<returns>The state object after the folding function is applied to each element of the sequence.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input sequence is null.</exception>
val acc : float
val ret : float
val spy : float
val stockRet : float
val x : ReturnObs
type Sentiment =
| Positive
| Negative
| Neutral
union case Sentiment.Positive: Sentiment
union case Sentiment.Negative: Sentiment
union case Sentiment.Neutral: Sentiment
type EarningsAnnouncementReturn =
{ EarningsCall: EarningsCall
TiingoObs: TiingoObs []
Sentiment: Sentiment option
Ear: float option }
Multiple items
EarningsAnnouncementReturn.EarningsCall: EarningsCall
--------------------
type EarningsCall =
{ CallId: CallId
Transcript: string [] }
Multiple items
EarningsAnnouncementReturn.TiingoObs: TiingoObs []
--------------------
type TiingoObs =
{ Date: DateTime
Close: decimal
High: decimal
Low: decimal
Open: decimal
Volume: int
AdjClose: decimal
AdjHigh: decimal
AdjLow: decimal
AdjOpen: decimal
... }
Multiple items
EarningsAnnouncementReturn.Sentiment: Sentiment option
--------------------
type Sentiment =
| Positive
| Negative
| Neutral
EarningsAnnouncementReturn.Ear: float option
val firstReturnAfterCall : call:EarningsCall -> returnObs:ReturnObs [] -> ReturnObs option
Find first observed return
val returnObs : ReturnObs []
val dateOfCall : DateTime
val computeEar : call:EarningsCall -> tiingoObs:TiingoObs [] -> float option
val getAdjReturns : (ReturnObs -> ReturnObs [] -> float option)
val threeDayWindow : ReturnObs []
val retObs : ReturnObs []
val generateEar : call:EarningsCall -> EarningsAnnouncementReturn option
val tiingoWindow : TiingoObs [] option
val flatDate : DateTime
val tslaCall : EarningsAnnouncementReturn option
val tryFind : predicate:('T -> bool) -> array:'T [] -> 'T option
<summary>Returns the first element for which the given function returns True.
Return None if no such element exists.</summary>
<param name="predicate">The function to test the input elements.</param>
<param name="array">The input array.</param>
<returns>The first element that satisfies the predicate, or None.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
val xs : EarningsAnnouncementReturn
Multiple items
type Async =
static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
static member AwaitTask : task:Task<'T> -> Async<'T> + 1 overload
static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
static member CancelDefaultToken : unit -> unit
static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
static member Choice : computations:seq<Async<'T option>> -> Async<'T option>
static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> + 3 overloads
static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
...
<summary>Holds static members for creating and manipulating asynchronous computations.</summary>
<remarks>
See also <a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">F# Language Guide - Async Workflows</a>.
</remarks>
<category index="1">Async Programming</category>
--------------------
type Async<'T> =
<summary>
An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception.
</summary>
<remarks>
This type has no members. Asynchronous computations are normally specified either by using an async expression
or the static methods in the <see cref="T:Microsoft.FSharp.Control.Async" /> type.
See also <a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">F# Language Guide - Async Workflows</a>.
</remarks>
<namespacedoc><summary>
Library functionality for asynchronous programming, events and agents. See also
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">Asynchronous Programming</a>,
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/members/events">Events</a> and
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/lazy-expressions">Lazy Expressions</a> in the
F# Language Guide.
</summary></namespacedoc>
<category index="1">Async Programming</category>
val ParallelThrottled : xs:seq<Async<'a>> -> Async<'a []>
val xs : seq<Async<'a>>
static member Async.Parallel : computations:seq<Async<'T>> -> Async<'T []>
static member Async.Parallel : computations:seq<Async<'T>> * ?maxDegreeOfParallelism:int -> Async<'T []>
val asyncCall : call:EarningsCall -> Async<EarningsAnnouncementReturn option>
val loop : (int -> 'a -> Async<EarningsAnnouncementReturn option>)
val attempt : int
val n : 'a
val async : AsyncBuilder
<summary>Builds an asynchronous workflow using computation expression syntax.</summary>
val e : exn
Multiple items
module Async
from EarningsAnnouncementReturn
--------------------
type Async =
static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
static member AwaitTask : task:Task<'T> -> Async<'T> + 1 overload
static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
static member CancelDefaultToken : unit -> unit
static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
static member Choice : computations:seq<Async<'T option>> -> Async<'T option>
static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T> + 3 overloads
static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
...
<summary>Holds static members for creating and manipulating asynchronous computations.</summary>
<remarks>
See also <a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">F# Language Guide - Async Workflows</a>.
</remarks>
<category index="1">Async Programming</category>
--------------------
type Async<'T> =
<summary>
An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception.
</summary>
<remarks>
This type has no members. Asynchronous computations are normally specified either by using an async expression
or the static methods in the <see cref="T:Microsoft.FSharp.Control.Async" /> type.
See also <a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">F# Language Guide - Async Workflows</a>.
</remarks>
<namespacedoc><summary>
Library functionality for asynchronous programming, events and agents. See also
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/asynchronous-workflows">Asynchronous Programming</a>,
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/members/events">Events</a> and
<a href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/lazy-expressions">Lazy Expressions</a> in the
F# Language Guide.
</summary></namespacedoc>
<category index="1">Async Programming</category>
static member Async.Sleep : dueTime:TimeSpan -> Async<unit>
static member Async.Sleep : millisecondsDueTime:int -> Async<unit>
val failwithf : format:Printf.StringFormat<'T,'Result> -> 'T
<summary>Print to a string buffer and raise an exception with the given
result. Helper printers must return strings.</summary>
<param name="format">The formatter.</param>
<returns>The formatted result.</returns>
val asyncCalls : calls:EarningsCall [] -> EarningsAnnouncementReturn []
static member Async.RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:Threading.CancellationToken -> 'T
val choose : chooser:('T -> 'U option) -> array:'T [] -> 'U []
<summary>Applies the given function to each element of the array. Returns
the array comprised of the results "x" for each element where
the function returns Some(x)</summary>
<param name="chooser">The function to generate options from the elements.</param>
<param name="array">The input array.</param>
<returns>The array of results.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
val id : x:'T -> 'T
<summary>The identity function</summary>
<param name="x">The input value.</param>
<returns>The same value.</returns>
val getEarsByYear : year:int -> EarningsAnnouncementReturn []
val year : int
val filter : predicate:('T -> bool) -> array:'T [] -> 'T []
<summary>Returns a new collection containing only the elements of the collection
for which the given predicate returns "true".</summary>
<param name="predicate">The function to test the input elements.</param>
<param name="array">The input array.</param>
<returns>An array containing the elements for which the given predicate returns true.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
property DateTime.Year: int with get
<summary>Gets the year component of the date represented by this instance.</summary>
<returns>The year, between 1 and 9999.</returns>
val ears2018 : EarningsAnnouncementReturn []
val ears2019 : EarningsAnnouncementReturn []
val ears2020 : EarningsAnnouncementReturn []
val ears2021 : EarningsAnnouncementReturn []
val calls2018 : EarningsCall []
val calls2019 : EarningsCall []
val calls2020 : EarningsCall []
val calls2021 : EarningsCall []
val xs : EarningsCall []
property Array.Length: int with get
<summary>Gets the total number of elements in all the dimensions of the <see cref="T:System.Array" />.</summary>
<exception cref="T:System.OverflowException">The array is multidimensional and contains more than <see cref="F:System.Int32.MaxValue" /> elements.</exception>
<returns>The total number of elements in all the dimensions of the <see cref="T:System.Array" />; zero if there are no elements in the array.</returns>
val earToJson : fileName:string -> ears:EarningsAnnouncementReturn [] -> unit
val fileName : string
val ears : EarningsAnnouncementReturn []
JsonConvert.SerializeObject(value: obj) : string
JsonConvert.SerializeObject(value: obj, settings: JsonSerializerSettings) : string
JsonConvert.SerializeObject(value: obj, [<ParamArray>] converters: JsonConverter []) : string
JsonConvert.SerializeObject(value: obj, formatting: Formatting) : string
JsonConvert.SerializeObject(value: obj, formatting: Formatting, settings: JsonSerializerSettings) : string
JsonConvert.SerializeObject(value: obj, type: Type, settings: JsonSerializerSettings) : string
JsonConvert.SerializeObject(value: obj, formatting: Formatting, [<ParamArray>] converters: JsonConverter []) : string
JsonConvert.SerializeObject(value: obj, type: Type, formatting: Formatting, settings: JsonSerializerSettings) : string
IO.File.WriteAllText(path: string, contents: string) : unit
IO.File.WriteAllText(path: string, contents: string, encoding: Text.Encoding) : unit