Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REF: splines restructure #415

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
calibrate method
  • Loading branch information
attack68 committed Sep 25, 2024
commit 7dccbe98eb1430ce3bead8a2228a2f22ffc3c78d
5 changes: 5 additions & 0 deletions rust/curves/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ pub trait CurveInterpolation {
// let timestamp = date.and_utc().timestamp();
index_left(&nodes.keys(), &date_timestamp, None)
}

/// Calibrate the interpolator to the Curve nodes if necessary
fn calibrate(&self, nodes: &NodesTimestamp) -> Result<(), PyErr> {
Ok(())
}
}

impl<T: CurveInterpolation, U: DateRoll> CurveDF<T, U> {
Expand Down
2 changes: 1 addition & 1 deletion rust/curves/interpolation/intp_log_cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use pyo3::{pyclass, pymethods};
use serde::{Deserialize, Serialize};
use std::cmp::PartialEq;

/// Define log-linear interpolation of nodes.
/// Define log-cubic interpolation of nodes.
#[pyclass(module = "rateslib.rs")]
#[derive(Clone, PartialEq, Serialize, Deserialize)]
pub struct LogCubicInterpolator {
Expand Down
Loading