-- MySQL dump 10.13  Distrib 8.0.33, for Win64 (x86_64)
--
-- Host: localhost    Database: market_data
-- ------------------------------------------------------
-- Server version	8.0.33

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `analystpricetarget`
--

DROP TABLE IF EXISTS `analystpricetarget`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `analystpricetarget` (
  `date` datetime NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `mean_target` decimal(19,2) DEFAULT NULL,
  `median_target` decimal(19,2) DEFAULT NULL,
  `high_target` decimal(19,2) DEFAULT NULL,
  `low_target` decimal(19,2) DEFAULT NULL,
  PRIMARY KEY (`symbol`,`date`),
  KEY `FK_AnalystPriceTarget_SecurityMaster` (`symbol`),
  CONSTRAINT `FK_AnalystPriceTarget_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `analystratings`
--



--
-- Table structure for table `balancesheet`
--

DROP TABLE IF EXISTS `balancesheet`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `balancesheet` (
  `asof` datetime NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `long_term_debt` decimal(19,2) DEFAULT NULL,
  `other_liabilities` decimal(19,2) DEFAULT NULL,
  `deferred_long_term_liabilities` decimal(19,2) DEFAULT NULL,
  `minority_interest` decimal(19,2) DEFAULT NULL,
  `negative_goodwill` decimal(19,2) DEFAULT NULL,
  `total_stockholder_equity` decimal(19,2) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `period` bit(1) NOT NULL,
  `inventory` decimal(19,2) DEFAULT NULL,
  `property_plant_and_equipment` decimal(19,2) DEFAULT NULL,
  `intangible_assets` decimal(19,2) DEFAULT NULL,
  `accumulated_amortization` decimal(19,2) DEFAULT NULL,
  `goodwill` decimal(19,2) DEFAULT NULL,
  `total_current_assets` decimal(19,2) DEFAULT NULL,
  `total_assets` decimal(19,2) DEFAULT NULL,
  `total_current_liabilities` decimal(19,2) DEFAULT NULL,
  `total_liabilities` decimal(19,2) DEFAULT NULL,
  `cash_and_cash_equivalents` decimal(19,2) DEFAULT NULL,
  PRIMARY KEY (`symbol`,`asof`,`period`),
  KEY `IX_BalanceSheet_Modified` (`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cashflowstatement`
--

DROP TABLE IF EXISTS `cashflowstatement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cashflowstatement` (
  `asof` datetime NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `depreciation_and_amortization` decimal(19,2) DEFAULT NULL,
  `deferred_income_taxes` decimal(19,2) DEFAULT NULL,
  `stock_based_compensation` decimal(19,2) DEFAULT NULL,
  `accounts_receivable` decimal(19,2) DEFAULT NULL,
  `inventory` decimal(19,2) DEFAULT NULL,
  `accounts_payable` decimal(19,2) DEFAULT NULL,
  `accrued_liabilities` decimal(19,2) DEFAULT NULL,
  `operating_cashflow` decimal(19,2) DEFAULT NULL,
  `free_cashflow` decimal(19,2) DEFAULT NULL,
  `period` int NOT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`asof`,`period`),
  KEY `IX_CashflowStatement_Modified` (`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `companyprofile`
--

DROP TABLE IF EXISTS `companyprofile`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `companyprofile` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `description` mediumtext COLLATE utf8mb4_0900_ai_ci,
  `pricing_source` varchar(10) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `can_roll_previous` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`symbol`),
  UNIQUE KEY `symbol` (`symbol`),
  KEY `IDX_SYMBOL` (`symbol`),
  CONSTRAINT `FK_CompanyProfile_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `currencyconversion`
--

DROP TABLE IF EXISTS `currencyconversion`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `currencyconversion` (
  `asof` datetime NOT NULL,
  `source_currency` varchar(10) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `destination_currency` varchar(10) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `destination_currency_name` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `units_per_source` double NOT NULL,
  `source_per_unit` double NOT NULL,
  PRIMARY KEY (`asof`,`source_currency`,`destination_currency`),
  KEY `IX_DATE_SOURCE` (`source_currency`,`destination_currency`,`asof`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `dictionary`
--

DROP TABLE IF EXISTS `dictionary`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dictionary` (
  `word` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `part_of_speech` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  PRIMARY KEY (`word`,`part_of_speech`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `dividendhistory`
--

DROP TABLE IF EXISTS `dividendhistory`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `dividendhistory` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `dividend_type` varchar(25) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `cash_amount` decimal(22,2) DEFAULT NULL,
  `div_ex_date` datetime NOT NULL,
  `declaration_date` datetime DEFAULT NULL,
  `record_date` datetime DEFAULT NULL,
  `payment_date` datetime DEFAULT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`symbol`,`div_ex_date`),
  KEY `symbol` (`symbol`),
  CONSTRAINT `FK_DividendHistory_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `earningsannouncements`
--

DROP TABLE IF EXISTS `earningsannouncements`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `earningsannouncements` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `date` datetime NOT NULL,
  `period_ending` datetime NOT NULL,
  `estimate` decimal(19,2) DEFAULT NULL,
  `reported` decimal(19,2) DEFAULT NULL,
  `surprise` decimal(19,2) DEFAULT NULL,
  `surprise_pct` decimal(10,2) DEFAULT NULL,
  `time` varchar(25) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`symbol`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `economicindicators`
--

DROP TABLE IF EXISTS `economicindicators`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `economicindicators` (
  `country_code` varchar(25) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `country_name` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `indicator_name` varchar(50) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `indicator_code` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `indicator_value` decimal(19,2) DEFAULT NULL,
  `year` int NOT NULL,
  `source` varchar(50) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`country_code`,`indicator_name`,`year`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `etfholdings`
--

DROP TABLE IF EXISTS `etfholdings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `etfholdings` (
  `etf_symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `holding_symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `holding_symbol_sc` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `pcnt_of_assets` decimal(19,2) DEFAULT NULL,
  `company` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  KEY `ETFHOLDINGS_IDX_ETFSYMBOL` (`etf_symbol`),
  CONSTRAINT `FK_ETFHoldings_SecurityMaster` FOREIGN KEY (`etf_symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `fundamentals`
--

DROP TABLE IF EXISTS `fundamentals`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `fundamentals` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `asof` date NOT NULL,
  `source` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `next_earnings_date` date DEFAULT NULL,
  `beta` decimal(19,2) DEFAULT NULL,
  `low52` decimal(19,2) DEFAULT NULL,
  `high52` decimal(19,2) DEFAULT NULL,
  `volume` bigint DEFAULT NULL,
  `market_cap` decimal(19,2) DEFAULT NULL,
  `pe` decimal(19,2) DEFAULT NULL,
  `eps` decimal(19,2) DEFAULT NULL,
  `peg` decimal(19,2) DEFAULT NULL,
  `return_on_assets` decimal(19,2) DEFAULT NULL,
  `return_on_equity` decimal(19,2) DEFAULT NULL,
  `total_cash` decimal(19,2) DEFAULT NULL,
  `total_debt` decimal(19,2) DEFAULT NULL,
  `shares_outstanding` decimal(19,2) DEFAULT NULL,
  `revenue` decimal(19,2) DEFAULT NULL,
  `revenue_per_share` decimal(19,2) DEFAULT NULL,
  `qtrly_revenue_growth` decimal(19,2) DEFAULT NULL,
  `gross_profit` decimal(19,2) DEFAULT NULL,
  `ebitda` decimal(19,2) DEFAULT NULL,
  `net_income_available_to_common` decimal(19,2) DEFAULT NULL,
  `book_value_per_share` decimal(19,2) DEFAULT NULL,
  `operating_cashflow` decimal(19,2) DEFAULT NULL,
  `leveraged_free_cashflow` decimal(19,2) DEFAULT NULL,
  `trailing_pe` decimal(19,2) DEFAULT NULL,
  `ebit` decimal(19,2) DEFAULT NULL,
  `enterprise_value` decimal(19,2) DEFAULT NULL,
  PRIMARY KEY (`symbol`,`asof`),
  KEY `PK_Fundamental_Symbol` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `headlines`
--

DROP TABLE IF EXISTS `headlines`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `headlines` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `asof` date NOT NULL,
  `headline` varchar(512) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `modified` datetime NOT NULL,
  `source` varchar(25) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  KEY `symbol` (`symbol`),
  KEY `IX_HEADLINES` (`symbol`,`asof`,`headline`),
  CONSTRAINT `FK_Headlines_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `historical`
--

DROP TABLE IF EXISTS `historical`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `historical` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `asof` datetime NOT NULL,
  `type` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `value` decimal(19,2) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`asof`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `incomestatement`
--

DROP TABLE IF EXISTS `incomestatement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `incomestatement` (
  `asof` datetime NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `total_revenue` decimal(19,2) DEFAULT NULL,
  `cost_of_revenue` decimal(19,2) DEFAULT NULL,
  `income_tax_expense` decimal(19,2) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `gross_profit` decimal(19,2) DEFAULT NULL,
  `net_income` decimal(19,2) DEFAULT NULL,
  `sga` decimal(19,2) DEFAULT NULL,
  `net_income_applicable_to_common_shares` decimal(19,2) DEFAULT NULL,
  `ebit` decimal(19,2) DEFAULT NULL,
  `operating_expenses` decimal(19,2) DEFAULT NULL,
  `research_and_development` decimal(19,2) DEFAULT NULL,
  `period` int NOT NULL,
  `interest_expense` decimal(19,2) DEFAULT NULL,
  PRIMARY KEY (`symbol`,`asof`,`period`),
  KEY `IX_IncomeStatement_Modified` (`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `insidertransaction`
--

DROP TABLE IF EXISTS `insidertransaction`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `insidertransaction` (
  `symbol` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `filing_date` datetime NOT NULL,
  `transaction_date` datetime NOT NULL,
  `insider_name` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `ownership_type` varchar(55) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `securities` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `nature_of_transaction` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `number_or_value_acquired_disposed` decimal(19,2) DEFAULT NULL,
  `price` decimal(19,2) DEFAULT NULL,
  `form` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `sec_accession_number` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `form_row_number` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`form`,`sec_accession_number`,`form_row_number`),
  KEY `symbol` (`symbol`),
  CONSTRAINT `FK_InsiderTransaction_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `lexicon`
--

DROP TABLE IF EXISTS `lexicon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `lexicon` (
  `word` varchar(55) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `sentiment` varchar(10) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `part_of_speech` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`word`,`sentiment`),
  KEY `IX_Lexicon` (`part_of_speech`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `marketholidays`
--

DROP TABLE IF EXISTS `marketholidays`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `marketholidays` (
  `Date` date NOT NULL,
  `Description` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`Date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `mstarsecurityid`
--

DROP TABLE IF EXISTS `mstarsecurityid`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `mstarsecurityid` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `security_identifier` varchar(25) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `modified` datetime NOT NULL,
  PRIMARY KEY (`symbol`),
  KEY `IX_HEADLINES` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `options`
--

DROP TABLE IF EXISTS `options`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `options` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `expiration_date` date NOT NULL,
  `option_type` char(1) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `strike` decimal(19,2) NOT NULL,
  `last_price` decimal(19,2) DEFAULT NULL,
  `change_price` decimal(19,2) DEFAULT NULL,
  `bid` decimal(19,2) DEFAULT NULL,
  `ask` decimal(19,2) DEFAULT NULL,
  `volume` int DEFAULT NULL,
  `open_interest` decimal(19,2) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`expiration_date`,`option_type`,`strike`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `premarket`
--

DROP TABLE IF EXISTS `premarket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `premarket` (
  `market` varchar(25) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `change_value` decimal(19,2) NOT NULL,
  `change_percent` decimal(19,2) NOT NULL,
  `timestamp` varchar(50) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  PRIMARY KEY (`market`,`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `prices`
--

DROP TABLE IF EXISTS `prices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `prices` (
  `date` date NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `open` decimal(19,2) DEFAULT NULL,
  `high` decimal(19,2) DEFAULT NULL,
  `low` decimal(19,2) DEFAULT NULL,
  `close` decimal(19,2) DEFAULT NULL,
  `volume` bigint DEFAULT NULL,
  `adjclose` decimal(19,2) DEFAULT NULL,
  `source` char(1) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`symbol`,`date`),
  KEY `IX_PRICES_DATE_SYMBOL` (`date` DESC,`symbol`),
  KEY `IX_PRICES_SYMBOL` (`symbol`),
  KEY `IX_PRICES_DATE` (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `secfilings`
--

DROP TABLE IF EXISTS `secfilings`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `secfilings` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `filing_date` datetime NOT NULL,
  `form` varchar(25) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `form_text` longblob NOT NULL,
  `description` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `sec_filing_url` varchar(255) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `sequence` bigint NOT NULL,
  `sec_accession_number` varchar(50) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`filing_date`,`sequence`,`sec_accession_number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `securitymaster`
--

DROP TABLE IF EXISTS `securitymaster`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `securitymaster` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `company` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `cik` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `sector` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `industry` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `security_type` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `create_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `splits`
--

DROP TABLE IF EXISTS `splits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `splits` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `effective_date` datetime NOT NULL,
  `ratio` varchar(10) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `applied` tinyint DEFAULT NULL,
  `applied_least_recent` datetime DEFAULT NULL,
  `applied_most_recent` datetime DEFAULT NULL,
  `modified` date DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  PRIMARY KEY (`symbol`,`effective_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `valuations`
--

DROP TABLE IF EXISTS `valuations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `valuations` (
  `valuation_date` datetime NOT NULL,
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `company` varchar(255) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `next_earnings_date` datetime DEFAULT NULL,
  `long_term_debt` decimal(22,2) DEFAULT NULL,
  `revenue` decimal(22,2) DEFAULT NULL,
  `debt_load` varchar(15) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `roic_avg` decimal(22,2) DEFAULT NULL,
  `bvps_dates` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `avg_equity_growth` decimal(22,2) DEFAULT NULL,
  `avg_equity_growth_2y` decimal(22,2) DEFAULT NULL,
  `avg_equity_growth_4y` decimal(22,2) DEFAULT NULL,
  `eps_dates` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `avg_eps_growth` decimal(22,2) DEFAULT NULL,
  `avg_eps_growth_2y` decimal(22,2) DEFAULT NULL,
  `avg_eps_growth_4y` decimal(22,2) DEFAULT NULL,
  `revenue_dates` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `avg_revenue_growth` decimal(22,2) DEFAULT NULL,
  `avg_revenue_growth_qtr` decimal(22,2) DEFAULT NULL,
  `avg_revenue_growth_2y` decimal(22,2) DEFAULT NULL,
  `avg_revenue_growth_4y` decimal(22,2) DEFAULT NULL,
  `avg_freecashflow_growth` decimal(22,2) DEFAULT NULL,
  `avg_operating_cashflow` decimal(22,2) DEFAULT NULL,
  `avg_working_capital` decimal(22,2) DEFAULT NULL,
  `bvps` decimal(22,2) DEFAULT NULL,
  `price_to_book` decimal(22,2) DEFAULT NULL,
  `eps` decimal(22,2) DEFAULT NULL,
  `pe` decimal(22,2) DEFAULT NULL,
  `peg` decimal(22,2) DEFAULT NULL,
  `implied_earnings_growth` decimal(22,2) DEFAULT NULL,
  `low_pe` decimal(22,2) DEFAULT NULL,
  `trailing_pe` decimal(22,2) DEFAULT NULL,
  `avg_low_trailing` decimal(22,2) DEFAULT NULL,
  `current_stock_estimate_price` decimal(22,2) DEFAULT NULL,
  `price_estimate_10y` decimal(22,2) DEFAULT NULL,
  `todays_price_for_required_return` decimal(22,2) DEFAULT NULL,
  `mos` decimal(22,2) DEFAULT NULL,
  `mos_80` decimal(22,2) DEFAULT NULL,
  `intrinsic_value` decimal(22,2) DEFAULT NULL,
  `rgv` decimal(22,2) DEFAULT NULL,
  `latest_price` decimal(22,2) DEFAULT NULL,
  `upside_pcnt` decimal(22,2) DEFAULT NULL,
  `downside_pcnt` decimal(22,2) DEFAULT NULL,
  `mean_target_price` decimal(22,2) DEFAULT NULL,
  `low_target_price` decimal(22,2) DEFAULT NULL,
  `high_target_price` decimal(22,2) DEFAULT NULL,
  `bargain_mos` tinyint(1) DEFAULT NULL,
  `bargain_mos_80` tinyint(1) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `beta90` decimal(19,2) DEFAULT NULL,
  `beta2Y` decimal(19,2) DEFAULT NULL,
  `roic_dates` varchar(50) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `roic_slope` decimal(22,2) DEFAULT NULL,
  `market_cap` decimal(22,2) DEFAULT NULL,
  `earnings_yield` decimal(22,12) DEFAULT NULL,
  `enterprise_value` decimal(22,2) DEFAULT NULL,
  `ebit` decimal(22,2) DEFAULT NULL,
  `tlb_rank_roic` decimal(22,2) DEFAULT NULL,
  `fundamental_value` decimal(22,2) DEFAULT NULL,
  `net_current_asset_value_per_share` decimal(22,2) DEFAULT NULL,
  `roic_latest` decimal(22,2) DEFAULT NULL,
  `sector` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `industry` varchar(255) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `debt_to_equity` decimal(22,2) DEFAULT NULL,
  `sec_13` tinyint(1) DEFAULT NULL,
  `sec_13_filing_date` datetime DEFAULT NULL,
  `roc_latest` decimal(22,4) DEFAULT NULL,
  `tlb_rank_roc` decimal(22,4) DEFAULT NULL,
  `operating_earnings` decimal(22,4) DEFAULT NULL,
  `am_rank` decimal(22,4) DEFAULT NULL,
  `acquirers_multiple` decimal(22,4) DEFAULT NULL,
  `dividend_yield` decimal(22,4) DEFAULT NULL,
  `shares_outstanding` decimal(22,4) DEFAULT NULL,
  `operating_cashflow` decimal(22,4) DEFAULT NULL,
  PRIMARY KEY (`symbol`,`valuation_date`),
  KEY `IX_VALUATIONS_DATE` (`valuation_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `yieldcurve`
--

DROP TABLE IF EXISTS `yieldcurve`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `yieldcurve` (
  `date` datetime NOT NULL,
  `1Mo` decimal(19,2) DEFAULT NULL,
  `3Mo` decimal(19,2) DEFAULT NULL,
  `6Mo` decimal(19,2) DEFAULT NULL,
  `1Yr` decimal(19,2) DEFAULT NULL,
  `2Yr` decimal(19,2) DEFAULT NULL,
  `3Yr` decimal(19,2) DEFAULT NULL,
  `5Yr` decimal(19,2) DEFAULT NULL,
  `7Yr` decimal(19,2) DEFAULT NULL,
  `10Yr` decimal(19,2) DEFAULT NULL,
  `20Yr` decimal(19,2) DEFAULT NULL,
  `30Yr` decimal(19,2) DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `zacksrank`
--

DROP TABLE IF EXISTS `zacksrank`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `zacksrank` (
  `symbol` varchar(15) COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `date` datetime NOT NULL,
  `zacks_rank` varchar(25) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `type` varchar(20) COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`symbol`,`date`),
  CONSTRAINT `FK_ZacksRank_SecurityMaster` FOREIGN KEY (`symbol`) REFERENCES `securitymaster` (`symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping events for database 'market_data'
--

--
-- Dumping routines for database 'market_data'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-05-18 10:05:58
