to= 99999 / gt;
lt; spikeThreshold value= 6 / gt;
lt; dateThreshold value= 3 / gt;
lt; filesForMl value= D: DiplomaProject FilesForML / gt;
lt;/factMinerSettings gt;
lt;/factEventAnalyzer gt;
Додаток 3. Збережені процедури і табличні уявлення бази даних FactEventAnalysisDB
_populateCoraxFactsTable
USE [FactEventAnalysisDB] ANSI_NULLS ONQUOTED_IDENTIFIER ONPROCEDURE [dbo]. [usp_populateCoraxFactsTable]
@ DateFrom int=0,
@ DateTo int=999999999,
@ SecIdFrom int=0,
@ SecIdTo int=999999999,
@ SecuritiesInserted int=0 output,
@ CoraxesInserted int=0 outputtable #Inserted
(int not null, int not null
) into dbo.CoraxFactsTable
(,,,,,
). UniqueCoraxId, .SecId # Inserted.SecId as SecId, .UniqueCoraxId as UniqueCoraxid, (c.EffectiveDate as int) as EffectiveDate, (c.ReportedDate as int) as ReportedDate, .EventType as EventType , .EventMajorType as EventMajorType.CoraxesSource as c.SecId gt;=@ SecIdFromc.SecId lt; =SecIdTo (
(c.ReportedDate gt;=@ DateFromc.ReportedDate lt;=@ DateTo)
(c.EffectiveDate gt;=@ DateFromc.EffectiveDate lt;=@ DateTo)
) @ CoraxesInserted=COUNT (*)
# Inserted
@ SecuritiesInserted=COUNT (t.SecId)
(select distinct SecId from #Inserted) as t
usp_clearFactsTables
USE [FactEventAnalysisDB] ANSI_NULLS ONQUOTED_IDENTIFIER ONPROCEDURE [dbo]. [usp_clearFactsTables]
@ DateFrom int=0,
@ DateTo int=999999999,
@ SecIdFrom int=0,
@ SecIdTo int=999999999,
@ IsPrices bit=0,
@ IsCorax bit=0,
@ IsSpike bit=0 (IsPrices=1) from.PriceFactsTable gt; =SecIdFromSecId lt; =SecIdTo (
(DateStart gt; =DateFromDateStart lt;=@ DateTo)
(DateEnd lt; =DateToDateEnd gt; =DateFrom)) (@ IsSpike=1) from.SpikeFactsTable gt; =SecIdFromSecId lt; =SecIdTo [Date] gt; =DateFrom [Date ] lt; =DateTo (IsCorax=1) from.CoraxFactsTable gt; =SecIdFromSecId lt; =SecIdTo (
(ReportedDate gt;=@ DateFromReportedDate lt;=@ DateTo)
(EffectiveDate gt;=@ DateFromEffectiveDate lt;=@ DateTo))
SpikeFactsHypothesis
USE [FactEventAnalysisDB] ANSI_NULLS ONQUOTED_IDENTIFIER ONview [dbo]. [SpikeFactsHypothesis] as.EventType as [CoraxEventType]
, cf.EventMajorType as [CoraxEventMajorType]
, csec.Ticker as [CoraxTicker]
, csec.Issuer as [CoraxIssuer]
, csec.SecType as [CoraxSecType]
, csec.InvType as [CoraxInvType]
, csec.PriceCurrency as [CoraxPriceCurrency]
, csec.Region as [CoraxRegion]
, csec.IssuerCountry as [CoraxIssuerCountry]
, csec.Exchange as [CoraxExchange]
, csec.IndustrySector as [CoraxIndustrySector]
, sf.SpikeType as [ChangeType]
, ssec.Ticker as [ChangeTicker]
, ssec.Issuer as [ChangeIssuer]
, ssec.SecType as [ChangeSecType]
, ssec.InvType as [ChangeInvType]
, ssec.PriceCurrency as [ChangePriceCurrency]
, ssec.Region as [ChangeRegion]
, ssec.IssuerCountry as [ChangeIssuerCountry]
, ssec.Exchange as [ChangeExchange]
, ssec.IndustrySector as [ChangeIndustrySector] .CoraxFactsTable as cfdbo.SecuritiesSource as csec on cf.SecId=csec.SecIddbo.Spikefactstable as sf on cf.EffectiveDate=sf. [Date] dbo.SecuritiesSource as ssec on sf.SecId=ssec.SecId.FieldType= Price
PriceFactsHypothesis
USE [FactEventAnalysisDB] ANSI_NULLS ONQUOTED_IDENTIFIER ON
view [dbo]. [PriceFactsHypothesis] as.EventType as [CoraxEventType]
, cf.EventMajorType as [CoraxEventMajorType]
, csec.Ticker as [CoraxTicker]
, csec.Issuer as [Cora...