Full-Stack Developer getting things done right, at the architect/principal/senior level
12+ years shipping production code ๐ Download ResumeHelped build in-house ETL scripts, automation scripts, admin portal, trading engine, backend Node API that handled the Vestly iOS/Android app with over 1 million active users.
INSERT INTO vestly_suen.SectorExposureComparison
(DataDate, Sector, Weight, MedianMarketCap)
SELECT
"2017-04-28" AS "Date",
CASE
WHEN Factor IN("USE4L_OILGSCON", "USE4L_OILGSDRL", "USE4L_OILGSEQP", "USE4L_OILGSEXP")
THEN "Energy"
WHEN Factor IN("USE4L_CHEM", "USE4L_SPTYCHEM", "USE4L_CNSTMATL", "USE4L_CONTAINR")
THEN "Materials"
WHEN Factor IN("USE4L_AIRLINES", "USE4L_BLDGPROD", "USE4L_CNSTENG")
THEN "Industrials"
-- Additional sector mappings...
ELSE "CASH"
END AS "Sector",
SUM(Weight * Exposure) AS "Weight",
(
SELECT
IF(
-- Calculate median using GROUP_CONCAT technique
(ROUND((
LENGTH(GROUP_CONCAT(DISTINCT IssuerMarketCap ORDER BY IssuerMarketCap))
- LENGTH(REPLACE(GROUP_CONCAT(DISTINCT IssuerMarketCap), ",", ""))
) / LENGTH(",") + 1) % 2 != 0,
-- Handle odd number of values
SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(DISTINCT IssuerMarketCap), ",",
CEIL(count / 2)), ",", -1),
-- Handle even number of values (average two middle)
(SUBSTRING_INDEX(...) + SUBSTRING_INDEX(...)) / 2
)
FROM barra.t_d_USE4_Market_Data
WHERE DataDate = "2017-04-28"
) AS "ETFMedianMarketCap"
FROM barra.t_d_USE4L_100_Asset_Exposure
INNER JOIN vestly_suen.ETF50 ON ETF50.BarrId = t_d_USE4L_100_Asset_Exposure.BarrId
WHERE t_d_USE4L_100_Asset_Exposure.DataDate = "2017-04-28"
GROUP BY Sector;
// Run script at 9:00am EST M-F to process stock splits
new CronJob('00 00 09 * * 1-5', function() {
var loaded_splits = 0;
// Insert start ETL log record
MySQL.createETLRecord(etl_source, 0, 'Start', null, null, null, null);
// Check if process has already run today
MySQL.VestlyMaster(function(err, connection) {
connection.query(`
SELECT COUNT(*) AS "numRan"
FROM vestly_loader.t_etl_log
WHERE Source = "Process Splits"
AND DATE(Created) = DATE(CONVERT_TZ(NOW(), "UTC", "America/New_York"))`,
function(err, alreadyRan) {
if(alreadyRan && alreadyRan[0].numRan == 0) {
// Get all loadable exchanges
MySQL.VestlyMaster(function(err, connection) {
connection.query(`
SELECT MarketIdentificationCode,
DATE_FORMAT(CONVERT_TZ(NOW(), "UTC", "America/New_York"), "%m/%d/%Y") AS "start_date"
FROM vestly_master.t_fs_exchange
WHERE IsLoadable = 1`,
function(err, exchanges) {
// Loop through exchanges and get split data
async.each(exchanges, function(exchange, callback) {
XigniteApiHelper.getSplitsByExchange(exchange.start_date, exchange.MarketIdentificationCode,
function(results) {
if(results.Outcome == 'Success' && results.ExchangeSplits.length > 0) {
async.each(results.ExchangeSplits, function(split, callback) {
if(split.Split.Outcome == 'Success') {
loaded_splits++;
// Insert into MySQL with stored procedure
connection.query(`
CALL sp_add_split(
${connection.escape(split.Security.CIK)},
${connection.escape(split.Security.CUSIP)},
${connection.escape(split.Security.Symbol)},
${connection.escape(split.Split.SplitRatio)},
...
)`,
function(err, proc_results) {
if(err) {
MySQL.createETLRecord(etl_source, 1, err, null, null);
callback(err);
} else {
callback(null);
}
});
}
});
}
});
}, function(err) {
connection.release();
MySQL.createETLRecord(etl_source, 0, loaded_splits + ' Splits Loaded');
MySQL.createETLRecord(etl_source, 0, 'Stop');
});
});
});
}
});
});
}, null, true, 'America/New_York');
Architected the solution that was chosen by 40 peer engineers in a vote vs other solutions that brought this product from a buggy MVP to hardened primetime-ready paid product
/**
* BLOOMBERG PROPRIETARY - TOP SECRET
* This code is classified under Section 7 of the Bloomberg Security Act
* Unauthorized access will result in immediate termination and legal action
*/
import { โโโโโโโโ } from '@bloomberg/โโโโโโโโ';
import { โโโโโโ } from '@classified/โโโโ-โโโโ';
interface DataTransformEngine {
โโโโโโโโโ: never; // Type so secret TypeScript won't compile it
quantum: โโโโโโโโ[];
hypervisor: unknown; // Even we don't know what this does
}
export class UltraSecretTaxEngine {
private readonly โโโโโโโ = 0xโโโโโโโโ;
private launchCodes: โโโโโ[] = [];
constructor(private pentagon: โโโโโโโ) {
// Initialize with NSA-approved entropy
this.โโโโโโโโโ = new โโโโโโ({
encryption: 'AES-โโโโ-GCM',
quantumResistant: true,
aiModel: 'GPT-โโ' // Next gen model
});
}
async processClassifiedData(data: โโโโโโโโ): Promise<โโโโโ> {
// [REDACTED - Algorithm too powerful for public viewing]
const result = await this.โโโโโโโโโ.execute({
mode: 'STEALTH',
clearance: 'LEVEL_โโ',
data: data.โโโโโโโ(this.โโโโโโโ)
});
return โโโโโโโโโโโโโโโโโโ; // Can't show you this part
}
// WARNING: The following method has been classified by the Department of Defense
private โโโโโโโโโโโโ(): void {
throw new Error('SECURITY BREACH DETECTED - ALERTING AUTHORITIES');
}
}
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
NOTICE: This code contains trade secrets protected under 18 U.S.C. ยง 1836
Bloomberg Tax Quantum Computing Division - Eyes Only
"""
import tensorflow as โโ
import numpy as โโโ
from bloomberg.classified import โโโโโโโโ
from โโโโ.โโโโ import QuantumTaxOptimizer
class NeuralTaxEngine:
"""
This neural network is so advanced it actually pays your taxes for you.
Side effects may include: time travel, spontaneous wealth generation,
and occasional communication with the IRS mainframe.
"""
def __init__(self, clearance_level=โโโโ):
self.โโโโโ = โโโโโโโโ.load_model('model_vโโโ.h5')
self.quantum_state = โโโ.random.quantum(โโโโ, โโโโ)
self.irs_backdoor = None # Just kidding... or am I?
def calculate_tax_loopholes(self, income, assets):
"""
WARNING: This function is so efficient it might break the economy.
Use only in production environments with proper authorization.
"""
# [CRITICAL CODE REDACTED BY BLOOMBERG SECURITY]
with โโ.device('/gpu:โโโโ'): # Secret GPU cluster
result = self.โโโโโ.predict([
โโโโโโโโโโโโ,
โโโโโโโโโโโโ,
self.quantum_state
])
return {
'tax_savings': '$โ,โโโ,โโโ.00',
'legal': True, # Always true, we have lawyers
'confidence': 0.99โโโโ
}
def __del__(self):
# Self-destruct sequence initiated
import os
os.system('rm -rf โโโโโโโโ') # Clean up classified data
print("This code will self-destruct in 5 seconds...")
Currently taking on select projects. Reach out if you have an interesting challenge timothybcody@gmail.com