Bug when using dt_to_unix_nanos in backtests
When trying to run a backtest with particular timestamps, `dt_to_unix_nanos` seems to be incorrectly parsing/rounding timestamps into int nanos, causing the backtest to fail to start. 

The following example raises a StopIteration erorr - but should probably work:
```
instrument = AUDUSD_SIM
example = TestDataProvider.betfair_trade_ticks()[0]
tick = TradeTick.from_dict(
    {
        **example.to_dict(example),
        **{
            "instrument_id": instrument.id.value,
            "ts_recv_ns": 1620394867930000000,
            "ts_event_ns": 1620394867930000000,
        },
    }
)
producer = BacktestDataProducer(
    logger=self.logger, instruments=[instrument], trade_ticks={instrument.id: [tick]}
)

producer.setup(start_ns=1620394867930000000, stop_ns=1620394867930000128)
```
diff --git a/nautilus_trader/backtest/data_producer.pyx b/nautilus_trader/backtest/data_producer.pyx
index 475c48c06..8cbabfdab 100644
--- a/nautilus_trader/backtest/data_producer.pyx
+++ b/nautilus_trader/backtest/data_producer.pyx
@@ -353,14 +353,20 @@ cdef class BacktestDataProducer(DataProducerFacade):
 
         if self._stream:
             # Set data stream start index
-            self._stream_index = next(
-                idx for idx, data in enumerate(self._stream) if start_ns <= data.ts_recv_ns
-            )
+            if start_ns < self._stream[0].ts_recv_ns:
+                self._stream_index_last = 0
+            else:
+                self._stream_index = next(
+                    idx for idx, data in enumerate(self._stream) if start_ns <= data.ts_recv_ns
+                )
 
             # Set data stream stop index
-            self._stream_index_last = len(self._stream) - 1 - next(
-                idx for idx, data in enumerate(reversed(self._stream)) if stop_ns <= data.ts_recv_ns
-            )
+            if stop_ns > self._stream[-1].ts_recv_ns:
+                self._stream_index_last = len(self._stream)- 1
+            else:
+                self._stream_index_last = len(self._stream) - 1 - next(
+                    idx for idx, data in enumerate(reversed(self._stream)) if stop_ns <= data.ts_recv_ns
+                )
 
             # Prepare initial data
             self._iterate_stream()
diff --git a/nautilus_trader/core/datetime.pyx b/nautilus_trader/core/datetime.pyx
index cf3c5506b..957a0d0e3 100644
--- a/nautilus_trader/core/datetime.pyx
+++ b/nautilus_trader/core/datetime.pyx
@@ -42,6 +42,7 @@ cdef int64_t MICROSECONDS_IN_SECOND = 1_000_000
 cdef int64_t NANOSECONDS_IN_SECOND = 1_000_000_000
 cdef int64_t NANOSECONDS_IN_MILLISECOND = 1_000_000
 cdef int64_t NANOSECONDS_IN_MICROSECOND = 1_000
+cdef int64_t NANOSECONDS_IN_DAY = 86400 * NANOSECONDS_IN_SECOND
 
 
 cpdef int64_t secs_to_nanos(double secs) except *:
@@ -212,7 +213,8 @@ cpdef int64_t dt_to_unix_nanos(datetime dt) except *:
 
     """
     # If timestamp is None then `-` unsupported operand for `NoneType` and `timedelta`
-    return lround((dt - UNIX_EPOCH).total_seconds() * NANOSECONDS_IN_SECOND)
+    cdef timedelta td = (dt - UNIX_EPOCH)
+    return td.days * NANOSECONDS_IN_DAY + td.seconds * NANOSECONDS_IN_SECOND + td.microsecond * NANOSECONDS_IN_MICROSECOND
 
 
 cpdef int64_t timedelta_to_nanos(timedelta delta) except *:
diff --git a/tests/unit_tests/backtest/test_backtest_data_producer.py b/tests/unit_tests/backtest/test_backtest_data_producer.py
index 7e26b4177..4d857b4e8 100644
--- a/tests/unit_tests/backtest/test_backtest_data_producer.py
+++ b/tests/unit_tests/backtest/test_backtest_data_producer.py
@@ -23,6 +23,7 @@ from nautilus_trader.model.data import GenericData
 from nautilus_trader.model.enums import BarAggregation
 from nautilus_trader.model.enums import BookLevel
 from nautilus_trader.model.orderbook.book import OrderBookSnapshot
+from nautilus_trader.model.tick import TradeTick
 from tests.test_kit.providers import TestDataProvider
 from tests.test_kit.providers import TestInstrumentProvider
 from tests.test_kit.stubs import MyData
@@ -43,8 +44,8 @@ class TestBacktestDataProducer:
 
         # Act
         # Assert
-        assert producer.min_timestamp_ns == 9223285636854774784
-        assert producer.max_timestamp_ns == -9223285636854776832
+        assert producer.min_timestamp_ns == 9223285636854775000
+        assert producer.max_timestamp_ns == -9223285636854776000
         assert producer.min_timestamp == pd.Timestamp("2262-04-10 23:47:16.854774+0000", tz="UTC")
         assert producer.max_timestamp == pd.Timestamp("1677-09-22 00:12:43.145224", tz="UTC")
         assert not producer.has_data
@@ -137,3 +138,26 @@ class TestBacktestDataProducer:
         assert str(next_data.ask) == "91.717"
         assert str(next_data.bid_size) == "1000000"
         assert str(next_data.ask_size) == "1000000"
+
+    def test_producer_run_start_stop_parsed_correctly(self):
+        instrument = AUDUSD_SIM
+        example = TestDataProvider.betfair_trade_ticks()[0]
+        tick = TradeTick.from_dict(
+            {
+                **example.to_dict(example),
+                **{
+                    "instrument_id": instrument.id.value,
+                    "ts_recv_ns": 1620394867930000000,
+                    "ts_event_ns": 1620394867930000000,
+                },
+            }
+        )
+        producer = BacktestDataProducer(
+            logger=self.logger, instruments=[instrument], trade_ticks={instrument.id: [tick]}
+        )
+
+        # Check timestamps within data range
+        producer.setup(start_ns=1620394867930000000, stop_ns=1620394867930000000)
+
+        # Check timestamps outside data range
+        producer.setup(start_ns=0, stop_ns=1620394867930000128)
diff --git a/tests/unit_tests/core/test_core_datetime.py b/tests/unit_tests/core/test_core_datetime.py
index 317189f77..90408ee4a 100644
--- a/tests/unit_tests/core/test_core_datetime.py
+++ b/tests/unit_tests/core/test_core_datetime.py
@@ -217,6 +217,7 @@ class TestDatetimeFunctions:
             [UNIX_EPOCH + timedelta(milliseconds=1), 1_000_000],
             [UNIX_EPOCH + timedelta(microseconds=3), 3_000],
             [UNIX_EPOCH + timedelta(hours=12), 43_200_000_000_000],
+            [datetime(2021, 5, 7, 13, 41, 7, 930000, tzinfo=pytz.utc), 1620394867930000000],
         ],
     )
     def test_dt_to_unix_nanos(self, value, expected):
['nautilus_trader/backtest/data_producer.pyx', 'nautilus_trader/core/datetime.pyx', 'tests/unit_tests/backtest/test_backtest_data_producer.py', 'tests/unit_tests/core/test_core_datetime.py']