Files
fn_registry/python/functions/finance/hawkes_intensity.md
T
egutierrez 63a9cb5273 feat: funciones Python datascience, finance, cybersecurity y pipelines
Datascience: aggregate_by_group, deduplicate_entities/relations, detect_drift,
diff_entities/relations, extract_entities/relations_llm, hotness_score, melt,
merge_graphs, pivot, build_entity/relation_schema_prompt.
Finance: avellaneda_stoikov_quotes, generate_gbm_prices, generate_taker_order,
hawkes_intensity + módulo finance.py.
Cybersecurity: envelope_encrypt/decrypt + módulo cybersecurity.py.
Pipelines: extraction_pipeline, monte_carlo_market, run_market_sim.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 17:11:32 +02:00

1.3 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path
hawkes_intensity function py finance 1.0.0 pure hawkes_intensity(base_rate: float, hawkes_alpha: float, hawkes_beta: float, event_times: list[float], current_time: float) -> float Calcula la intensidad lambda(t) de un proceso de Hawkes en el tiempo actual. Modela la autocorrelacion temporal de eventos de mercado (rafagas de ordenes).
simulation
hawkes
stochastic-process
montecarlo
finance
point-process
false
numpy
false
python/functions/finance/finance.py

Ejemplo

intensity = hawkes_intensity(
    base_rate=1.0,
    hawkes_alpha=0.8,
    hawkes_beta=2.0,
    event_times=[0.5, 1.2, 1.8],
    current_time=2.5,
)
# Intensidad > base_rate por excitacion de eventos pasados

Notas

Funcion pura — determinista dado el mismo historial de eventos. hawkes_alpha controla la magnitud del salto de intensidad por evento. hawkes_beta controla la velocidad de decaimiento (mayor beta = decaimiento mas rapido). La condicion de estabilidad del proceso es hawkes_alpha < hawkes_beta. Eventos con ti >= current_time se ignoran automaticamente. Retorna max(0.0, ...) para garantizar intensidad no negativa.