Test
-- Refactored SQL using CTEs for clarity and potential performance improvements
WITH CTE_EX_DATA AS (
-- Clearing Data
SELECT
CM.REPORTING_FIRM_ID,
MOptD.CONTRACT_MARKET_CODE,
MOptD.FUTURES_EXPIRATION_DATE,
MOptD.REPORT_DATE,
SUM(MOptD.LONG) AS LONG,
SUM(MOptD.SHORT) AS SHORT,
MOptD.OPTION_CLASS_CODE,
MOptD.EXPIRATION_ID_DATE,
MOptD.PUT_CALL_INDICATOR,
CAST(MOptD.STRIKE_PRICE AS decimal(18, 6)) AS STRIKE_PRICE
FROM MEMBER_OPTION_DAY AS MOptD WITH (NOLOCK)
INNER JOIN CLEARING_MEMBERSHIP AS CM WITH (NOLOCK)
ON MOptD.EXCHANGE_INITIALS = CM.EXCHANGE_INITIALS
AND MOptD.CLEARING_MEMBERSHIP_ID = CM.CLEARING_MEMBERSHIP_ID
GROUP BY
CM.REPORTING_FIRM_ID,
MOptD.CONTRACT_MARKET_CODE,
MOptD.FUTURES_EXPIRATION_DATE,
MOptD.REPORT_DATE,
MOptD.OPTION_CLASS_CODE,
MOptD.EXPIRATION_ID_DATE,
MOptD.PUT_CALL_INDICATOR,
MOptD.STRIKE_PRICE
),
CTE_OM_DATA AS (
-- Omni Data
SELECT
AOD.CONTRACT_MARKET_CODE,
AOD.FUTURES_EXPIRATION_DATE,
AOD.REPORT_DATE,
SUM(AOD.LONG) AS LONG,
SUM(AOD.SHORT) AS SHORT,
AOD.OWNER_ID,
AOD.TRADER_SUFFIX,
REPORTING_FIRM.REPORTING_FIRM_ID AS OMNI_RF,
AOD.OPTION_CLASS_CODE,
AOD.EXPIRATION_ID_DATE,
AOD.PUT_CALL_INDICATOR,
CAST(AOD.STRIKE_PRICE AS decimal(18, 6)) AS STRIKE_PRICE
FROM ACCOUNT_OPTION_DAY AS AOD WITH (NOLOCK)
INNER JOIN REPORTING_FIRM WITH (NOLOCK)
ON AOD.OWNER_ID = REPORTING_FIRM.OWNER_ID
AND AOD.TRADER_SUFFIX = REPORTING_FIRM.TRADER_SUFFIX
WHERE AOD.ACCOUNT_TYPE_CODE > 0
GROUP BY
REPORTING_FIRM.REPORTING_FIRM_ID,
AOD.CONTRACT_MARKET_CODE,
AOD.FUTURES_EXPIRATION_DATE,
AOD.REPORT_DATE,
AOD.OWNER_ID,
AOD.TRADER_SUFFIX,
AOD.OPTION_CLASS_CODE,
AOD.EXPIRATION_ID_DATE,
AOD.PUT_CALL_INDICATOR,
AOD.STRIKE_PRICE
),
CTE_LT_DATA AS (
-- LT Data
SELECT
AOD.REPORTING_FIRM_ID,
AOD.CONTRACT_MARKET_CODE,
CM.EXCHANGE_INITIALS + ' - ' + CM.CONTRACT_MARKET_NAME AS CONTRACT_MARKET,
AOD.FUTURES_EXPIRATION_DATE,
AOD.REPORT_DATE,
AOD.OPTION_CLASS_CODE,
AOD.EXPIRATION_ID_DATE,
AOD.PUT_CALL_INDICATOR,
CAST(AOD.STRIKE_PRICE AS decimal(18, 6)) AS STRIKE_PRICE,
SUM(AOD.LONG) AS LONG,
SUM(AOD.SHORT) AS SHORT
FROM ACCOUNT_OPTION_DAY AS AOD WITH (NOLOCK)
INNER JOIN CONTRACT_MARKET AS CM WITH (NOLOCK)
ON AOD.CONTRACT_MARKET_CODE = CM.CONTRACT_MARKET_CODE
GROUP BY
AOD.REPORTING_FIRM_ID,
AOD.CONTRACT_MARKET_CODE,
AOD.FUTURES_EXPIRATION_DATE,
AOD.REPORT_DATE,
AOD.OPTION_CLASS_CODE,
AOD.EXPIRATION_ID_DATE,
AOD.PUT_CALL_INDICATOR,
AOD.STRIKE_PRICE,
CM.CONTRACT_MARKET_NAME,
CM.EXCHANGE_INITIALS
)
SELECT *
FROM (
SELECT
LT_DATA.REPORTING_FIRM_ID,
LT_DATA.CONTRACT_MARKET_CODE,
LT_DATA.CONTRACT_MARKET,
LT_DATA.FUTURES_EXPIRATION_DATE,
LT_DATA.OPTION_CLASS_CODE,
LT_DATA.EXPIRATION_ID_DATE AS 'OPTIONS_EXPIRATION_DATE',
LT_DATA.PUT_CALL_INDICATOR,
LT_DATA.STRIKE_PRICE,
LT_DATA.REPORT_DATE,
COALESCE(EX_DATA.LONG, 0) AS 'L_Exch',
COALESCE(OM_DATA.LONG, 0) AS L_CB,
COALESCE(LT_DATA.LONG, 0) AS L_LargeTrader,
COALESCE(EX_DATA.LONG, 0) + COALESCE(OM_DATA.LONG, 0) - COALESCE(LT_DATA.LONG, 0) AS L_Difference,
COALESCE(EX_DATA.SHORT, 0) AS 'S_Exch',
COALESCE(OM_DATA.SHORT, 0) AS S_CB,
COALESCE(LT_DATA.SHORT, 0) AS S_LargeTrader,
COALESCE(EX_DATA.SHORT, 0) + COALESCE(OM_DATA.SHORT, 0) - COALESCE(LT_DATA.SHORT, 0) AS S_Difference,
OptCrDt.LAST_PROCESSING_DATE,
REPORTING_FIRM_RESP_PER.SYSUSER_ID,
CM.CURRENT_RPT_LEVEL
FROM CTE_LT_DATA AS LT_DATA
INNER JOIN OPTIONS_CRITICAL_DATE AS OptCrDt WITH (NOLOCK)
ON LT_DATA.CONTRACT_MARKET_CODE = OptCrDt.CONTRACT_MARKET_CODE
AND LT_DATA.EXPIRATION_ID_DATE = OptCrDt.EXPIRATION_ID_DATE
AND LT_DATA.OPTION_CLASS_CODE = OptCrDt.OPTION_CLASS_CODE
AND LT_DATA.FUTURES_EXPIRATION_DATE = OptCrDt.FUTURES_EXPIRATION_DATE
INNER JOIN REPORTING_FIRM_RESP_PER WITH (NOLOCK)
ON LT_DATA.REPORTING_FIRM_ID = REPORTING_FIRM_RESP_PER.REPORTING_FIRM_ID
INNER JOIN CONTRACT_MARKET AS CM WITH (NOLOCK)
ON CM.CONTRACT_MARKET_CODE = LT_DATA.CONTRACT_MARKET_CODE
LEFT JOIN CTE_OM_DATA AS OM_DATA
ON OM_DATA.CONTRACT_MARKET_CODE = LT_DATA.CONTRACT_MARKET_CODE
AND OM_DATA.FUTURES_EXPIRATION_DATE = LT_DATA.FUTURES_EXPIRATION_DATE
AND OM_DATA.REPORT_DATE = LT_DATA.REPORT_DATE
AND OM_DATA.STRIKE_PRICE = LT_DATA.STRIKE_PRICE
AND OM_DATA.PUT_CALL_INDICATOR = LT_DATA.PUT_CALL_INDICATOR
AND OM_DATA.EXPIRATION_ID_DATE = LT_DATA.EXPIRATION_ID_DATE
AND OM_DATA.OPTION_CLASS_CODE = LT_DATA.OPTION_CLASS_CODE
AND OM_DATA.OMNI_RF = LT_DATA.REPORTING_FIRM_ID
LEFT JOIN CTE_EX_DATA AS EX_DATA
ON EX_DATA.CONTRACT_MARKET_CODE = LT_DATA.CONTRACT_MARKET_CODE
AND EX_DATA.FUTURES_EXPIRATION_DATE = LT_DATA.FUTURES_EXPIRATION_DATE
AND EX_DATA.REPORT_DATE = LT_DATA.REPORT_DATE
AND EX_DATA.STRIKE_PRICE = LT_DATA.STRIKE_PRICE
AND EX_DATA.PUT_CALL_INDICATOR = LT_DATA.PUT_CALL_INDICATOR
AND EX_DATA.EXPIRATION_ID_DATE = LT_DATA.EXPIRATION_ID_DATE
AND EX_DATA.OPTION_CLASS_CODE = LT_DATA.OPTION_CLASS_CODE
AND EX_DATA.REPORTING_FIRM_ID = LT_DATA.REPORTING_FIRM_ID
) AS Opt_00_01
WHERE
(L_Difference < CURRENT_RPT_LEVEL * -1 OR S_Difference < CURRENT_RPT_LEVEL * -1)
AND LAST_PROCESSING_DATE > REPORT_DATE
AND REPORT_DATE BETWEEN '2023-01-01' AND '2023-04-30'
AND SYSUSER_ID LIKE '%blindsey%';
China's Real Estate Market Faces Ongoing Crisis
Summary:
China's real estate sector, once a pillar of its economic growth, is now in turmoil, with leading developers like Evergrande and Country Garden facing financial collapse. Contributing nearly a third of China's GDP, the sector's decline is causing widespread economic instability. The crisis stems from excessive borrowing, overbuilding, and weakening consumer confidence. Government interventions, such as lowering mortgage rates and down payment requirements, have yet to restore stability. As China's aging population further reduces housing demand, the global implications of this crisis continue to unfold.
Steps to Prepare Your Home for Sale
Summary:
When preparing your home for sale, there are several key steps to ensure it appeals to potential buyers. Start by decluttering and deep cleaning, which can make your home feel more spacious and inviting. Depersonalize the space by removing personal items, allowing buyers to envision themselves living there. Consider making minor repairs or updates, such as a fresh coat of neutral paint, to enhance your home’s appeal. Staging your home—focusing on key rooms like the kitchen and living areas—can help you create a lasting impression. Finally, don’t overlook curb appeal, as first impressions begin the moment a buyer arrives.
Is Renting or Buying Better in NWI
Summary:
Summary:
In Northwest Indiana, the decision between renting and buying a home depends on various factors, including financial stability and lifestyle preferences. Buying a home can be a great long-term investment, especially as home prices tend to appreciate in this region, offering potential equity growth. It also provides stability with predictable mortgage payments and the freedom to customize your space. However, buying requires higher upfront costs and long-term commitment. Renting offers more flexibility, fewer maintenance responsibilities, and lower initial costs, but you miss out on building equity. Ultimately, the right choice depends on your personal financial goals and plans.
Federal Reserve Cuts Interest Rates by 0.5%
Summary:
In September 2024, the Federal Reserve announced a significant interest rate cut of 0.5%, lowering the federal funds rate to a target range of 4.75% to 5%. This decision came as the Fed observed continued economic growth, though job gains slowed, and inflation showed signs of progress toward the 2% target. The rate cut aims to support maximum employment while stabilizing inflation. Despite this move, the Fed remains cautious, closely monitoring data to adjust policy as needed to balance employment and inflation risks.
Top Reasons to Buy a Home in NWI
Summary:
Buying a home in Northwest Indiana (NWI) offers numerous advantages, particularly for those looking to escape higher costs in neighboring states like Illinois. The region's affordable housing, strong job market, and proximity to Chicago make it an attractive option for buyers. Homeownership in NWI not only provides more space for families but also benefits from lower property taxes and a higher quality of life, with ample outdoor activities and community amenities. Additionally, remote work has expanded interest in the area, as people seek better value without compromising on proximity to urban centers.
Paris Real Estate Prices Continue Decline in 2024
Summary: The Paris real estate market in 2024 is experiencing a continued decline in property prices, with an average drop of around 4% expected throughout the year. Key factors driving this downturn include rising interest rates and limited access to credit, which have reduced buyer demand. However, areas near major urban developments, such as those benefiting from the Grand Paris Express project, remain attractive for long-term investment. Despite these price drops, Paris continues to be a resilient market with demand still outpacing supply, particularly for high-quality properties in central arrondissements.
London House Prices Decline Amid Market Adjustments
Summary: In 2024, London’s real estate market is experiencing price corrections, with a 3.9% drop in prime property prices during the first quarter. High mortgage rates and the cost of living continue to impact buyer affordability, particularly in central areas. Despite these challenges, certain districts like King’s Cross and Walthamstow remain attractive for investors, driven by ongoing redevelopment projects and rental demand. Looking ahead, a gradual market recovery is anticipated, especially as mortgage rates stabilize and demand increases.
Milan’s Residential Real Estate Prices Climb
Summary: In 2024, Milan’s residential real estate market remains strong, with prices increasing by 2.27% compared to last year. The city center continues to see some of the highest prices, reaching over €10,000 per square meter in prime areas like Centro and Porta Nuova. Meanwhile, suburban areas offer more affordable options, with prices around €3,000 per square meter. Despite rising costs, demand remains robust, driven by both domestic and international interest, especially for luxury and eco-friendly properties. The market is also bolstered by Milan's cultural appeal and ongoing urban development projects.
Tokyo's Real Estate Market Surges in 2024
Summary: Tokyo's residential real estate market has seen significant growth in 2024, with rising land prices and strong demand across both rental and buying sectors. Residential land prices in Tokyo have increased by 4.6%, driven by low interest rates, urban redevelopment, and increasing foreign investment. Areas like Minato and Shibuya remain in high demand, especially for luxury apartments. Despite concerns about a potential bubble, the market's resilience is bolstered by Japan's favorable financing conditions and a stable economic environment. However, investors are advised to remain cautious of potential price corrections.
China’s Real Estate Crisis Intensifies in 2024
Summary: China's real estate market continues to face severe challenges, with massive oversupply, falling demand, and deep-rooted financial instability among developers. Despite government intervention, including stimulus measures and policy changes in major cities like Guangzhou, Suzhou, and Shanghai, the market remains in a precarious state. Developers struggle to complete projects, many of which were pre-sold, leading to a cycle of declining prices and diminishing buyer confidence. Experts suggest that these short-term remedies may not be enough to resolve the deeper systemic issues threatening the market and the overall economy.
Hong Kong's Commercial Real Estate Faces Crisis
The article highlights the challenges facing Hong Kong's commercial real estate market due to high interest rates, a supply glut, and weakened demand. Properties like Cubus in Causeway Bay are being sold under pressure, with widespread distressed asset sales and rising vacancy rates. Office rents and property values have dropped significantly, while banks face bad debts from overleveraged property owners. Despite recent rate cuts, recovery is expected to be slow, with experts predicting the downturn to last into 2025, exacerbated by geopolitical and economic instability.
Rome’s Real Estate Market Grows in 2024
Tokyo's residential real estate market in 2024 is experiencing strong demand, driven by low-interest rates and Tokyo's role as a global economic hub. Despite an increase in inventory, housing prices have remained high, especially in central areas like Minato and Shibuya. Factors such as Tokyo's urban development, aging population, and infrastructure projects are shaping the market. Additionally, there is growing interest in properties that support modern lifestyles, such as those suited for remote work. The outlook remains positive, with prices expected to remain stable or rise in high-demand areas.
Tokyo's Real Estate Market Thrives in 2024
Tokyo's residential real estate market in 2024 is experiencing strong demand, driven by low-interest rates and Tokyo's role as a global economic hub. Despite an increase in inventory, housing prices have remained high, especially in central areas like Minato and Shibuya. Factors such as Tokyo's urban development, aging population, and infrastructure projects are shaping the market. Additionally, there is growing interest in properties that support modern lifestyles, such as those suited for remote work. The outlook remains positive, with prices expected to remain stable or rise in high-demand areas.
China’s Property Market Faces Long-term Challenges
China's real estate market continues to face significant challenges, exacerbated by a combination of oversupply, declining home prices, and liquidity crises among major developers. Developers like Evergrande and Country Garden are struggling with massive debts, leading to defaults and stalled projects. Despite government interventions such as relaxing mortgage conditions and converting unsold homes into social housing, the market remains sluggish. Structural issues, including a shrinking population and a high homeownership rate, further complicate recovery efforts, signaling that deep fiscal and land reforms may be necessary to address the sector's long-term imbalances.
Top Reasons to Buy a Home in Northwest Indiana
Northwest Indiana is a great place for homebuyers due to its affordability, proximity to Chicago, and diverse housing options. The area offers beautiful natural landscapes, including Lake Michigan, and plenty of recreational activities such as hiking and golfing. Additionally, strong schools and a growing job market make it an ideal location for families and professionals alike. With excellent commuter rail options and a lower cost of living compared to nearby cities, Northwest Indiana combines suburban charm with easy access to urban conveniences.
Step-by-Step Guide for Preparing Your Home
Preparing your home for sale involves several key steps to ensure it stands out to buyers and maximizes its value. Start by improving curb appeal, such as landscaping and freshening up the entryway. Declutter and depersonalize the interior to help buyers envision themselves in the space, and consider neutral paint colors to create a welcoming atmosphere. Address any necessary repairs and touch up scuff marks, as these small fixes can leave a lasting impression. Finally, deep clean and stage your home to highlight its best features and create a fresh, inviting environment that appeals to potential buyers
Hidden Costs in Home Buying
When purchasing a home, buyers often focus on the down payment and mortgage, but there are numerous additional costs to consider. Closing costs, which typically range from 2-5% of the home's purchase price, include loan origination fees, title insurance, and government recording fees. Home inspections and appraisals are essential for avoiding major issues, with inspections costing between $300-$500. Other expenses such as property taxes, homeowners insurance, and maintenance costs like lawn care or HOA fees can add up significantly after moving in. Proper budgeting for these hidden costs can prevent financial surprises down the road..
Ultra-weak home prices in northern China arrive in southern powerhouses.
China's property crisis, once limited to northern regions like the ex-coal boomtown Hegang, has now spread to wealthier southern cities, causing a significant drop in home prices and economic concern. Cities like Huizhou, once buoyed by proximity to major hubs like Shenzhen, have seen home values plummet by over 45%, leaving homeowners like Wendy Ye facing severe financial strain. Nationwide, home values have dropped nearly 30% since their peak in 2021, a result of the government’s crackdown on developer debt. This property deflation threatens to weaken household wealth, reduce domestic consumption, and hinder economic growth, particularly in southern economic powerhouses like Guangdong.
US inflation data cemented big cut for one Fed official, dissent for another.
Federal Reserve officials, Governors Christopher Waller and Michelle Bowman, expressed differing views on the recent half-percentage-point interest rate cut, reflecting a broader debate within the central bank. Waller supported the larger cut, citing weaker-than-expected inflation data and the risk of undershooting the Fed’s 2% inflation target. Bowman, however, dissented, advocating for a smaller quarter-point cut, arguing that inflation, still around 2.5%, suggested the larger reduction was premature and could send the wrong message. This marked the first dissent in 19 years, underscoring the ongoing division within the Fed on how to manage inflation and future rate cuts