You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of functionality of this package is going to be inspired from https:github.com/xKDR/eventstudies.
Software design
Should use TimeFrames.jl for constructing event-time data frame.
There doesn't seem to be a requirement for inventing a new type (struct). Methods can directly accept a TimeFrame object or any other Base type object like AbstractVector{Date}.
Methods
1. Converting from physical (calendar/clock) time to event time.
Given a vector of timestamps of any of the supported types (sub-type of TimeType) this function will convert timestamps into event time of Int type based on the value of event which contains the time of the occurrence of the event. event will be looked up in timestamps and the nearest match will be considered as t0. Observations before t0 will be negative time starting from -1 till the start of the series and, similarly, observations after t0 will start from 1 till the end of the series.
Given a TimeFrame object find t0 of all events inside tf, and realign tf based on the event times. events is a dictionary containing a mapping from column names of tf to the event time of type T. The width column decided whether an event was successfully found in tf or not (outcomes), this information could be stored as DataFrame table-level metadata. Apart from this a list of successful events also needs to be returned, this also could be stored as table-level metadata.
Run the market model (linear regression) using firm returns and market returns and return regression results, return residuals if true. If residuals is true then a TimeFrame object is returned otherwise regression object is returned of type StatsModels.TableRegressionModel.
3. Remapping of event frame
remap(tf::TimeFrame, f::Function)::TimeFrame
Apply the remapping function f on TimeFrame tf. Supported function may include cumsum and cumprod to begin with.
A lot of functionality of this package is going to be inspired from https:github.com/xKDR/eventstudies.
Software design
struct
). Methods can directly accept aTimeFrame
object or any otherBase
type object likeAbstractVector{Date}
.Methods
1. Converting from physical (calendar/clock) time to event time.
Given a vector of
timestamps
of any of the supported types (sub-type ofTimeType
) this function will converttimestamps
into event time ofInt
type based on the value ofevent
which contains the time of the occurrence of the event.event
will be looked up intimestamps
and the nearest match will be considered as t0. Observations before t0 will be negative time starting from -1 till the start of the series and, similarly, observations after t0 will start from 1 till the end of the series.Given a
TimeFrame
object find t0 of all events insidetf
, and realigntf
based on the event times.events
is a dictionary containing a mapping from column names oftf
to the event time of typeT
. The width column decided whether an event was successfully found intf
or not (outcomes
), this information could be stored as DataFrame table-level metadata. Apart from this a list of successful events also needs to be returned, this also could be stored as table-level metadata.Outcome types
2. Market model
Run the market model (linear regression) using firm returns and market returns and return regression results, return residuals if
true
. Ifresiduals
istrue
then aTimeFrame
object is returned otherwise regression object is returned of typeStatsModels.TableRegressionModel
.3. Remapping of event frame
Apply the remapping function
f
on TimeFrametf
. Supported function may includecumsum
andcumprod
to begin with.4. Inference procedures
Compute confidence intervals using
strategy
function. Usage will be something like:inference(tf, Bootstrap.bootstrap, [std, BasicSampling(1000)])
.The text was updated successfully, but these errors were encountered: