About US Government Contracts
The US Government Contracts dataset by Quiver Quantitative tracks the transactions of government contracts with publicly traded companies. The data covers over 700 US Equities, starts in October 2019, and is delivered on a daily frequency. Quiver Quantitative creates this dataset by using the API for USASpending.gov, which has the official open data source of federal spending information. The rows in this dataset only show new contracts, not payments or modifications to existing contracts. The dollar amounts are based on the total dollars obligated from each contract.
This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.
About Quiver Quantitative
Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.
About QuantConnect
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
Algorithm Example
from AlgorithmImports import *
from QuantConnect.DataSource import *
class QuiverGovernmentContractAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2020, 10, 7) #Set Start Date
self.set_end_date(2021, 10, 11) #Set End Date
self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
# Subscribe to government contract data for AAPL to generate trade signal
self.dataset_symbol = self.add_data(QuiverGovernmentContract, self.aapl).symbol
# history request
history = self.history(self.dataset_symbol, 10, Resolution.DAILY)
self.debug(f"We got {len(history)} items from historical data request of {self.dataset_symbol}.")
def on_data(self, slice: Slice) -> None:
# Trade only base on government contract data
for gov_contracts in slice.Get(QuiverGovernmentContract).values():
# Buy if over 50000 government contract amount, suggesting a large income
if any([gov_contract.amount > 50000 for gov_contract in gov_contracts]):
self.set_holdings(self.aapl, 1)
# Sell if below 10000 government contract amount, suggesting a smaller than usual income
elif any([gov_contract.amount < 10000 for gov_contract in gov_contracts]):
self.set_holdings(self.aapl, -1)
Example Applications
The Quiver Quantitative US Government Contracts dataset enables you to create strategies using the latest information on government contracts activity. Examples include the following strategies:
- Buying securities that have received the most new government contracts awards over the last month
- Trading securities that have had the biggest change in government contracts awards over the last year
Pricing
Cloud Access
Harness US Government Contract data in the QuantConnect Cloud for your backtesting and live trading purposes.
On Premise Download
Download US Government Contract historical records for your LEAN backtesting on premise with the LEAN CLI.
Explore Other Datasets
VIX Daily Price
Dataset by CBOE
Cross Asset Model
Dataset by ExtractAlpha
US Treasury Yield Curve
Dataset by Treasury Department