The conventional estimated time of writing of the Book of Daniel is 167-165 BC. The reason is simple: up to that date historical events are predicted with a great accuracy, but after that date prophecies are incorrect. This sounds reasonable, yet, the argument is incorrect. It seems that Daniel’s book has been edited several times and the last edition is much after 165 BC.
In its present version 70 year weeks in Daniel 9:24 gives the time of Jesus, but Daniel 9:26 refers to the murder of Onias III about 171 BC. Calculating not 62 year weeks but 42 year weeks gives the following result: Order to rebuild Jerusalem by Cyrus, 539 BC. 7*49=343 years. This gives 539-343=196 BC. Adding half of a jubilee (50 years), that is 25 years, gives 196-25=171 BC. The time the Anointed one is destroyed. After that Zadoks of Onias formed the Essene community. As 70 year weeks cannot in any calculation give the death of Onias III, we must conclude that the Book of Daniel has been re-edited later.
All prophesies in Daniel refer to Hasmoneans: the statue is Babylon, Persia, Greek, Hellenists (Seleuchs and Ptolemys), and the stone is Israel of Maccabees. The three companions in fire are Maccabees, who keep the law and are helped by God, insanity of Nebukadnessar for 7 years is 7 jubilees, the time before Israel is re-established and a minor family, Hasmoneans is installed as the king. The writing in the wall is that priestly prophecies are always fulfilled and determine the fate of nations. Daniel in the lion’s cave is again that Maccabees keep the law and are helped by God. Naturally nothing is from Babylon era, Daniel even states that Dareios, not Cyrus, conquered Babylon. The visions are the theory of four powers: Babylon, Persia, Alexander and Hellenists. The small horn is Antiochus IV Epiphanes. The war between South and North is Ptolemies and Seleuchs exactly. The abomination of desolation is the statue of Jupiter. This all is before 167 BC.
From Daniel 11:36 the prophecy refers to a later time and the Book of Daniel in Septuagint must have been edited around 40-30 BC. Daniel 11:36 refers to the war between Octavianus and Antonius, first the sea battle, then Octavian takes Egypt. The prophecy predicts that Rome will lose (to Israel with God’s help). The strange god, God of the fortresses, that Octavian worships is Julius Caesar, who adopted Octavianus (Augustus) after his death and the comet declared Caesar as a god. Thus, Augustus was the Son of God. In this re-edition of Daniel the 50 year weeks (jubilee of year weeks) was changed to 70 year weeks and the time for Messiah was moved to 28 AD, and the (minor) destruction of the temple and the city by Antioch IV Epiphanes become a prophecy of the war of 66-73 AD. It is in this added part that you find the time 1290 days from the abomination of desolation to the end of these miraculous events (must be Messiah appeared here). Thus, Daniel’s book was edited to create a new messianic time that falls exactly to the time of Jesus and Agrippa.
Caesar’s comet was the first comet that was seen as a positive sign. The symbol of Caesar’s comet is very similar to the Christian cross. It is not possible that Jews would have thought of a comet as a positive sign without Caesar’s comet, but after Octavian was reborn as the Son of God Caesar, comet become the maker of the Messiah. Herod Agrippa was born after a comet appeared, thus he could think of himself as the Son of God.
Jews had an earlier prophecy of a star. It is Balaam’s prophecy, and the star most probably does not refer to a comet. A star refers to the king, but as the heavenly sign it probably means the Polar Star. At the time of Balaam the old Polar Star, Thuban, was discarded and a new Polar Star was Kochab, but understood as two stars: two pillars (Kochab and Pherkad) of a temple.
The star of Bethlehem, however, was associated with the murder of the sons of Bethlehem. This murder of the sons of Bethlehem by Herod the Great can only be Herod murdering Hasmonean princes. Thus, Bethlehem is not a city, it is Hasmoneans. Mica’s prophecy of Bethlehem as the origin of the Messiah does not mean a city Bethlehem, it mentions a minor family of Israel. As Bethlehem is Hasmoneans, the star of Bethlehem must be a star connected with Hasmoneans. The natural candidate is the Halley comet of 12 BC. It corresponds to the Halley comet of 66 AD, which was seen as the coming of the Messiah in the sky. Herod Agrippa was born in 11 BC or 10 BC and his birth was connected with the comet. Because of Caesar’s comet, this comet was interpreted that Herod Agrippa would be a divine king.